Skip to content

Commit 35a6946

Browse files
targosTrott
authored andcommittedOct 17, 2020
tools: update gyp-next to v0.6.2
PR-URL: #35690 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent a373130 commit 35a6946

File tree

6 files changed

+128
-53
lines changed

6 files changed

+128
-53
lines changed
 
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: node-gyp integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [macos-latest, ubuntu-latest, windows-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- name: Clone gyp-next
14+
uses: actions/checkout@v2
15+
with:
16+
path: gyp-next
17+
- name: Clone nodejs/node-gyp
18+
uses: actions/checkout@v2
19+
with:
20+
repository: nodejs/node-gyp
21+
path: node-gyp
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 14.x
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
cd node-gyp
31+
npm install --no-progress
32+
- name: Replace gyp in node-gyp
33+
shell: bash
34+
run: |
35+
rm -rf node-gyp/gyp
36+
cp -r gyp-next node-gyp/gyp
37+
- name: Run tests
38+
run: |
39+
cd node-gyp
40+
npm test

‎tools/gyp/.github/workflows/nodejs-windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build-windows:
77
runs-on: windows-latest
88
steps:
9-
- name: Clone node-gyp
9+
- name: Clone gyp-next
1010
uses: actions/checkout@v2
1111
with:
1212
path: gyp-next
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: release-please
7+
jobs:
8+
release-please:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: GoogleCloudPlatform/release-please-action@v2.5.6
12+
with:
13+
token: ${{ secrets.GITHUB_TOKEN }}
14+
release-type: python
15+
package-name: gyp-next
16+
bump-minor-pre-major: Yes

‎tools/gyp/CHANGELOG.md

+49-40
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,70 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file.
3+
### [0.6.2](https://www.github.com/nodejs/gyp-next/compare/v0.6.1...v0.6.2) (2020-10-16)
44

5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
65

7-
## [Unreleased]
6+
### Bug Fixes
87

9-
## [0.6.0] - 2020-10-13
8+
* do not rewrite absolute paths to avoid long paths ([#74](https://www.github.com/nodejs/gyp-next/issues/74)) ([c2ccc1a](https://www.github.com/nodejs/gyp-next/commit/c2ccc1a81f7f94433a94f4d01a2e820db4c4331a))
9+
* only include MARMASM when toolset is target ([5a2794a](https://www.github.com/nodejs/gyp-next/commit/5a2794aefb58f0c00404ff042b61740bc8b8d5cd))
1010

11-
### Added
12-
- The Makefile generator will now output shared libraries directly to the product
13-
directory on all platforms (previously only macOS).
11+
### [0.6.1](https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1) (2020-10-14)
1412

15-
## [0.5.0] - 2020-09-30
1613

17-
### Added
18-
- Extended compile_commands_json generator to consider more file extensions than
19-
just `c` and `cc`. `cpp` and `cxx` are now supported.
20-
- Source files with duplicate basenames are now supported.
14+
### Bug Fixes
15+
16+
* Correctly rename object files for absolute paths in MSVS generator.
17+
18+
## [0.6.0](https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0) (2020-10-13)
19+
20+
21+
### Features
22+
23+
* The Makefile generator will now output shared libraries directly to the product directory on all platforms (previously only macOS).
24+
25+
## [0.5.0](https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0) (2020-09-30)
26+
27+
28+
### Features
29+
30+
* Extended compile_commands_json generator to consider more file extensions than just `c` and `cc`. `cpp` and `cxx` are now supported.
31+
* Source files with duplicate basenames are now supported.
2132

2233
### Removed
23-
- The `--no-duplicate-basename-check` option was removed.
24-
- The `msvs_enable_marmasm` configuration option was removed in favor of
25-
auto-inclusion of the "marmasm" sections for Windows on ARM.
2634

27-
## [0.4.0] - 2020-07-14
35+
* The `--no-duplicate-basename-check` option was removed.
36+
* The `msvs_enable_marmasm` configuration option was removed in favor of auto-inclusion of the "marmasm" sections for Windows on ARM.
37+
38+
## [0.4.0](https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0) (2020-07-14)
39+
40+
41+
### Features
42+
43+
* Added support for passing arbitrary architectures to Xcode builds, enables `arm64` builds.
44+
45+
### Bug Fixes
46+
47+
* Fixed a bug on Solaris where copying archives failed.
48+
49+
## [0.3.0](https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0) (2020-06-06)
50+
2851

29-
### Added
30-
- Added support for passing arbitrary architectures to Xcode builds, enables `arm64` builds.
52+
### Features
3153

32-
### Fixed
33-
- Fixed a bug on Solaris where copying archives failed.
54+
* Added support for MSVC cross-compilation. This allows compilation on x64 for a Windows ARM target.
3455

35-
## [0.3.0] - 2020-06-06
56+
### Bug Fixes
3657

37-
### Added
38-
- Added support for MSVC cross-compilation. This allows compilation on x64 for
39-
a Windows ARM target.
58+
* Fixed XCode CLT version detection on macOS Catalina.
4059

41-
### Fixed
42-
- Fixed XCode CLT version detection on macOS Catalina.
60+
### [0.2.1](https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1) (2020-05-05)
4361

44-
## [0.2.1] - 2020-05-05
4562

46-
### Fixed
47-
- Relicensed to Node.js contributors.
48-
- Fixed Windows bug introduced in v0.2.0.
63+
### Bug Fixes
4964

50-
## [0.2.0] - 2020-04-06
65+
* Relicensed to Node.js contributors.
66+
* Fixed Windows bug introduced in v0.2.0.
5167

52-
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp
53-
with changes made over the years in Node.js and node-gyp.
68+
## [0.2.0](https://github.com/nodejs/gyp-next/releases/tag/v0.2.0) (2020-04-06)
5469

55-
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.0...HEAD
56-
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
57-
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
58-
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
59-
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
60-
[0.2.1]: https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1
61-
[0.2.0]: https://github.com/nodejs/gyp-next/releases/tag/v0.2.0
70+
This is the first release of this project, based on https://chromium.googlesource.com/external/gyp with changes made over the years in Node.js and node-gyp.

‎tools/gyp/pylib/gyp/generator/msvs.py

+21-11
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,12 @@ def GenerateOutput(target_list, target_dicts, data, params):
21772177

21782178

21792179
def _GenerateMSBuildFiltersFile(
2180-
filters_path, source_files, rule_dependencies, extension_to_rule_name, platforms
2180+
filters_path,
2181+
source_files,
2182+
rule_dependencies,
2183+
extension_to_rule_name,
2184+
platforms,
2185+
toolset,
21812186
):
21822187
"""Generate the filters file.
21832188
@@ -2197,6 +2202,7 @@ def _GenerateMSBuildFiltersFile(
21972202
rule_dependencies,
21982203
extension_to_rule_name,
21992204
platforms,
2205+
toolset,
22002206
filter_group,
22012207
source_group,
22022208
)
@@ -2222,6 +2228,7 @@ def _AppendFiltersForMSBuild(
22222228
rule_dependencies,
22232229
extension_to_rule_name,
22242230
platforms,
2231+
toolset,
22252232
filter_group,
22262233
source_group,
22272234
):
@@ -2257,13 +2264,14 @@ def _AppendFiltersForMSBuild(
22572264
rule_dependencies,
22582265
extension_to_rule_name,
22592266
platforms,
2267+
toolset,
22602268
filter_group,
22612269
source_group,
22622270
)
22632271
else:
22642272
# It's a source. Create a source entry.
22652273
_, element = _MapFileToMsBuildSourceType(
2266-
source, rule_dependencies, extension_to_rule_name, platforms
2274+
source, rule_dependencies, extension_to_rule_name, platforms, toolset
22672275
)
22682276
source_entry = [element, {"Include": source}]
22692277
# Specify the filter it is part of, if any.
@@ -2273,7 +2281,7 @@ def _AppendFiltersForMSBuild(
22732281

22742282

22752283
def _MapFileToMsBuildSourceType(
2276-
source, rule_dependencies, extension_to_rule_name, platforms
2284+
source, rule_dependencies, extension_to_rule_name, platforms, toolset
22772285
):
22782286
"""Returns the group and element type of the source file.
22792287
@@ -2301,9 +2309,8 @@ def _MapFileToMsBuildSourceType(
23012309
elif ext in [".s", ".asm"]:
23022310
group = "masm"
23032311
element = "MASM"
2304-
for platform in platforms:
2305-
if platform.lower() in ["arm", "arm64"]:
2306-
element = "MARMASM"
2312+
if "arm64" in platforms and toolset == "target":
2313+
element = "MARMASM"
23072314
elif ext == ".idl":
23082315
group = "midl"
23092316
element = "Midl"
@@ -3613,14 +3620,16 @@ def _AddSources2(
36133620
rule_dependencies,
36143621
extension_to_rule_name,
36153622
_GetUniquePlatforms(spec),
3623+
spec["toolset"],
36163624
)
3617-
if group == "compile":
3618-
# Always add an <ObjectFileName> value to support duplicate
3619-
# source file basenames.
3625+
if group == "compile" and not os.path.isabs(source):
3626+
# Add an <ObjectFileName> value to support duplicate source
3627+
# file basenames, except for absolute paths to avoid paths
3628+
# with more than 260 characters.
36203629
file_name = os.path.splitext(source)[0] + ".obj"
3621-
if (file_name.startswith("..\\")):
3630+
if file_name.startswith("..\\"):
36223631
file_name = re.sub(r"^(\.\.\\)+", "", file_name)
3623-
elif (file_name.startswith("$(")):
3632+
elif file_name.startswith("$("):
36243633
file_name = re.sub(r"^\$\([^)]+\)\\", "", file_name)
36253634
detail.append(["ObjectFileName", "$(IntDir)\\" + file_name])
36263635
grouped_sources[group].append([element, {"Include": source}] + detail)
@@ -3728,6 +3737,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags, spec):
37283737
rule_dependencies,
37293738
extension_to_rule_name,
37303739
platforms,
3740+
toolset,
37313741
)
37323742
missing_sources = _VerifySourcesExist(sources, project_dir)
37333743

‎tools/gyp/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
setup(
1717
name="gyp-next",
18-
version="0.6.0",
18+
version="0.6.2",
1919
description="A fork of the GYP build system for use in the Node.js projects",
2020
long_description=long_description,
2121
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)