tools: update gyp-next to v0.13.0

PR-URL: https://github.com/nodejs/node/pull/44605
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
Jiawen Geng
2022-09-14 15:55:11 +08:00
committed by GitHub
parent 309ca4513e
commit bb0986f79d
7 changed files with 90 additions and 60 deletions

View File

@@ -11,9 +11,9 @@ jobs:
max-parallel: 8
matrix:
os: [macos-latest, ubuntu-latest] # , windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:

View File

@@ -8,16 +8,16 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: ["3.6", "3.10"]
python: ["3.7", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Clone gyp-next
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: gyp-next
- name: Clone nodejs/node-gyp
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: nodejs/node-gyp
path: node-gyp

View File

@@ -7,11 +7,11 @@ jobs:
runs-on: windows-latest
steps:
- name: Clone gyp-next
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: gyp-next
- name: Clone nodejs/node
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: nodejs/node
path: node

View File

@@ -1,5 +1,17 @@
# Changelog
## [0.13.0](https://www.github.com/nodejs/gyp-next/compare/v0.12.1...v0.13.0) (2022-05-11)
### Features
* add PRODUCT_DIR_ABS variable ([#151](https://www.github.com/nodejs/gyp-next/issues/151)) ([80d2626](https://www.github.com/nodejs/gyp-next/commit/80d26263581db829b61b312a7bdb5cc791df7824))
### Bug Fixes
* execvp: printf: Argument list too long ([#147](https://www.github.com/nodejs/gyp-next/issues/147)) ([c4e14f3](https://www.github.com/nodejs/gyp-next/commit/c4e14f301673fadbac3ab7882d0b5f4d02530cb9))
### [0.12.1](https://www.github.com/nodejs/gyp-next/compare/v0.12.0...v0.12.1) (2022-04-06)

View File

@@ -104,12 +104,16 @@ def Load(
default_variables.setdefault(key, val)
output_dir = params["options"].generator_output or params["options"].toplevel_dir
if (default_variables['GENERATOR'] == 'ninja'):
default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir,
'out', default_variables['build_type']))
if default_variables["GENERATOR"] == "ninja":
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, "out", default_variables["build_type"]),
)
else:
default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir,
default_variables['build_type']))
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),
)
# Give the generator the opportunity to set additional variables based on
# the params it will receive in the output phase.

View File

@@ -106,6 +106,7 @@ def CalculateVariables(default_variables, params):
default_variables.setdefault("SHARED_LIB_DIR", "$(builddir)/lib.$(TOOLSET)")
default_variables.setdefault("LIB_DIR", "$(obj).$(TOOLSET)")
def CalculateGeneratorInputInfo(params):
"""Calculate the generator specific info that gets fed to input (called by
gyp)."""
@@ -157,12 +158,12 @@ cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--s
# Note: this does not handle spaces in paths
define xargs
$(1) $(word 1,$(2))
$(1) $(word 1,$(2))
$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
endef
define write-to-file
@: >$(1)
@: >$(1)
$(call xargs,@printf "%s\\n" >>$(1),$(2))
endef
@@ -226,12 +227,12 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# Note: this does not handle spaces in paths
define xargs
$(1) $(word 1,$(2))
$(1) $(word 1,$(2))
$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
endef
define write-to-file
@: >$(1)
@: >$(1)
$(call xargs,@printf "%s\\n" >>$(1),$(2))
endef
@@ -1858,35 +1859,35 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
self.flavor not in ("mac", "openbsd", "netbsd", "win")
and not self.is_standalone_static_library
):
if self.flavor in ('linux', 'android'):
self.WriteMakeRule(
[self.output_binary],
link_deps,
actions = ['$(call create_thin_archive,$@,$^)']
)
if self.flavor in ("linux", "android"):
self.WriteMakeRule(
[self.output_binary],
link_deps,
actions=["$(call create_thin_archive,$@,$^)"],
)
else:
self.WriteDoCmd(
[self.output_binary],
link_deps,
"alink_thin",
part_of_all,
postbuilds=postbuilds,
)
self.WriteDoCmd(
[self.output_binary],
link_deps,
"alink_thin",
part_of_all,
postbuilds=postbuilds,
)
else:
if self.flavor in ('linux', 'android'):
self.WriteMakeRule(
[self.output_binary],
link_deps,
actions = ['$(call create_archive,$@,$^)']
)
else:
self.WriteDoCmd(
[self.output_binary],
link_deps,
"alink",
part_of_all,
postbuilds=postbuilds,
)
if self.flavor in ("linux", "android"):
self.WriteMakeRule(
[self.output_binary],
link_deps,
actions=["$(call create_archive,$@,$^)"],
)
else:
self.WriteDoCmd(
[self.output_binary],
link_deps,
"alink",
part_of_all,
postbuilds=postbuilds,
)
elif self.type == "shared_library":
self.WriteLn(
"%s: LD_INPUTS := %s"
@@ -1904,9 +1905,15 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
)
# z/OS has a .so target as well as a sidedeck .x target
if self.flavor == "zos":
self.WriteLn('%s: %s' % (
QuoteSpaces(self.GetSharedObjectFromSidedeck(self.output_binary)),
QuoteSpaces(self.output_binary)))
self.WriteLn(
"%s: %s"
% (
QuoteSpaces(
self.GetSharedObjectFromSidedeck(self.output_binary)
),
QuoteSpaces(self.output_binary),
)
)
elif self.type == "loadable_module":
for link_dep in link_deps:
assert " " not in link_dep, (
@@ -1993,21 +2000,28 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
)
if self.flavor != "zos":
installable_deps.append(install_path)
if self.flavor == 'zos' and self.type == 'shared_library':
if self.flavor == "zos" and self.type == "shared_library":
# lib.target/libnode.so has a dependency on $(obj).target/libnode.so
self.WriteDoCmd([self.GetSharedObjectFromSidedeck(install_path)],
[self.GetSharedObjectFromSidedeck(self.output)], 'copy',
comment='Copy this to the %s output path.' %
file_desc, part_of_all=part_of_all)
self.WriteDoCmd(
[self.GetSharedObjectFromSidedeck(install_path)],
[self.GetSharedObjectFromSidedeck(self.output)],
"copy",
comment="Copy this to the %s output path." % file_desc,
part_of_all=part_of_all,
)
# Create a symlink of libnode.x to libnode.version.x
self.WriteDoCmd([self.GetUnversionedSidedeckFromSidedeck(install_path)],
[install_path], 'symlink',
comment='Symlnk this to the %s output path.' %
file_desc, part_of_all=part_of_all)
self.WriteDoCmd(
[self.GetUnversionedSidedeckFromSidedeck(install_path)],
[install_path],
"symlink",
comment="Symlnk this to the %s output path." % file_desc,
part_of_all=part_of_all,
)
# Place libnode.version.so and libnode.x symlink in lib.target dir
installable_deps.append(self.GetSharedObjectFromSidedeck(install_path))
installable_deps.append(
self.GetUnversionedSidedeckFromSidedeck(install_path))
self.GetUnversionedSidedeckFromSidedeck(install_path)
)
if self.output != self.alias and self.alias != self.target:
self.WriteMakeRule(
[self.alias],
@@ -2015,13 +2029,13 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
comment="Short alias for building this %s." % file_desc,
phony=True,
)
if self.flavor == 'zos' and self.type == 'shared_library':
if self.flavor == "zos" and self.type == "shared_library":
# Make sure that .x symlink target is run
self.WriteMakeRule(
['all'],
["all"],
[
self.GetUnversionedSidedeckFromSidedeck(install_path),
self.GetSharedObjectFromSidedeck(install_path)
self.GetSharedObjectFromSidedeck(install_path),
],
comment='Add %s to "all" target.' % file_desc,
phony=True,

View File

@@ -15,7 +15,7 @@ with open(path.join(here, "README.md")) as in_file:
setup(
name="gyp-next",
version="0.12.1",
version="0.13.0",
description="A fork of the GYP build system for use in the Node.js projects",
long_description=long_description,
long_description_content_type="text/markdown",