Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2020-12-19 12:27:54 +0300
committerDanielle Adams <adamzdanielle@gmail.com>2021-01-12 15:09:26 +0300
commitb367d5a61d3327561121669494f2b61046812549 (patch)
tree142b16220b5e3bc09807a03aaacc3208b01663fd /tools
parentec3e841f59473ee68f97452fdb3ee403f2422220 (diff)
tools: update gyp-next to v0.7.0
Refs: https://github.com/nodejs/gyp-next/releases/tag/v0.7.0 PR-URL: https://github.com/nodejs/node/pull/36580 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/gyp/CHANGELOG.md19
-rw-r--r--tools/gyp/pylib/gyp/generator/cmake.py4
-rw-r--r--tools/gyp/pylib/gyp/generator/msvs.py8
-rw-r--r--tools/gyp/pylib/gyp/input.py2
-rw-r--r--tools/gyp/pylib/gyp/xcode_emulation.py69
-rw-r--r--[-rwxr-xr-x]tools/gyp/setup.py2
-rwxr-xr-xtools/js2c.py2
7 files changed, 62 insertions, 44 deletions
diff --git a/tools/gyp/CHANGELOG.md b/tools/gyp/CHANGELOG.md
index 53c922b6c90..79403676950 100644
--- a/tools/gyp/CHANGELOG.md
+++ b/tools/gyp/CHANGELOG.md
@@ -1,5 +1,24 @@
# Changelog
+## [0.7.0](https://www.github.com/nodejs/gyp-next/compare/v0.6.2...v0.7.0) (2020-12-17)
+
+
+### ⚠ BREAKING CHANGES
+
+* **msvs:** On Windows, arguments passed to the "action" commands are no longer transformed to replace slashes with backslashes.
+
+### Features
+
+* **xcode:** --cross-compiling overrides arch-specific settings ([973bae0](https://www.github.com/nodejs/gyp-next/commit/973bae0b7b08be7b680ecae9565fbd04b3e0787d))
+
+
+### Bug Fixes
+
+* **msvs:** do not fix paths in action command arguments ([fc22f83](https://www.github.com/nodejs/gyp-next/commit/fc22f8335e2016da4aae4f4233074bd651d2faea))
+* cmake on python 3 ([fd61f5f](https://www.github.com/nodejs/gyp-next/commit/fd61f5faa5275ec8fc98e3c7868c0dd46f109540))
+* ValueError: invalid mode: 'rU' while trying to load binding.gyp ([d0504e6](https://www.github.com/nodejs/gyp-next/commit/d0504e6700ce48f44957a4d5891b142a60be946f))
+* xcode cmake parsing ([eefe8d1](https://www.github.com/nodejs/gyp-next/commit/eefe8d10e99863bc4ac7e2ed32facd608d400d4b))
+
### [0.6.2](https://www.github.com/nodejs/gyp-next/compare/v0.6.1...v0.6.2) (2020-10-16)
diff --git a/tools/gyp/pylib/gyp/generator/cmake.py b/tools/gyp/pylib/gyp/generator/cmake.py
index f5ceacfca36..75f58223697 100644
--- a/tools/gyp/pylib/gyp/generator/cmake.py
+++ b/tools/gyp/pylib/gyp/generator/cmake.py
@@ -41,7 +41,7 @@ import gyp.xcode_emulation
try:
# maketrans moved to str in python3.
_maketrans = string.maketrans
-except NameError:
+except (NameError, AttributeError):
_maketrans = str.maketrans
generator_default_variables = {
@@ -1047,7 +1047,7 @@ def WriteTarget(
# XCode settings
xcode_settings = config.get("xcode_settings", {})
- for xcode_setting, xcode_value in xcode_settings.viewitems():
+ for xcode_setting, xcode_value in xcode_settings.items():
SetTargetProperty(
output,
cmake_target_name,
diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py
index 32bf4746a17..96283b27575 100644
--- a/tools/gyp/pylib/gyp/generator/msvs.py
+++ b/tools/gyp/pylib/gyp/generator/msvs.py
@@ -423,13 +423,7 @@ def _BuildCommandLineForRuleRaw(
# file out of the raw command string, and some commands (like python) are
# actually batch files themselves.
command.insert(0, "call")
- # Fix the paths
- # TODO(quote): This is a really ugly heuristic, and will miss path fixing
- # for arguments like "--arg=path" or "/opt:path".
- # If the argument starts with a slash or dash, it's probably a command line
- # switch
- arguments = [i if (i[:1] in "/-") else _FixPath(i) for i in cmd[1:]]
- arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in arguments]
+ arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in cmd[1:]]
arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments]
if quote_cmd:
# Support a mode for using cmd directly.
diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py
index 5504390c0bb..90397762404 100644
--- a/tools/gyp/pylib/gyp/input.py
+++ b/tools/gyp/pylib/gyp/input.py
@@ -231,7 +231,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes, is_target, check
# Open the build file for read ('r') with universal-newlines mode ('U')
# to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n'
# which otherwise will fail eval()
- if sys.platform == "zos":
+ if PY3 or sys.platform == "zos":
# On z/OS, universal-newlines mode treats the file as an ascii file.
# But since node-gyp produces ebcdic files, do not use that mode.
build_file_contents = open(build_file_path, "r").read()
diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
index 8af2b39f9a1..a79aaa41fbc 100644
--- a/tools/gyp/pylib/gyp/xcode_emulation.py
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
@@ -654,28 +654,32 @@ class XcodeSettings(object):
self._WarnUnimplemented("MACH_O_TYPE")
self._WarnUnimplemented("PRODUCT_TYPE")
- if arch is not None:
- archs = [arch]
- else:
- assert self.configname
- archs = self.GetActiveArchs(self.configname)
- if len(archs) != 1:
- # TODO: Supporting fat binaries will be annoying.
- self._WarnUnimplemented("ARCHS")
- archs = ["i386"]
- cflags.append("-arch " + archs[0])
-
- if archs[0] in ("i386", "x86_64"):
- if self._Test("GCC_ENABLE_SSE3_EXTENSIONS", "YES", default="NO"):
- cflags.append("-msse3")
- if self._Test(
- "GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS", "YES", default="NO"
- ):
- cflags.append("-mssse3") # Note 3rd 's'.
- if self._Test("GCC_ENABLE_SSE41_EXTENSIONS", "YES", default="NO"):
- cflags.append("-msse4.1")
- if self._Test("GCC_ENABLE_SSE42_EXTENSIONS", "YES", default="NO"):
- cflags.append("-msse4.2")
+ # If GYP_CROSSCOMPILE (--cross-compiling), disable architecture-specific
+ # additions and assume these will be provided as required via CC_host,
+ # CXX_host, CC_target and CXX_target.
+ if not gyp.common.CrossCompileRequested():
+ if arch is not None:
+ archs = [arch]
+ else:
+ assert self.configname
+ archs = self.GetActiveArchs(self.configname)
+ if len(archs) != 1:
+ # TODO: Supporting fat binaries will be annoying.
+ self._WarnUnimplemented("ARCHS")
+ archs = ["i386"]
+ cflags.append("-arch " + archs[0])
+
+ if archs[0] in ("i386", "x86_64"):
+ if self._Test("GCC_ENABLE_SSE3_EXTENSIONS", "YES", default="NO"):
+ cflags.append("-msse3")
+ if self._Test(
+ "GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS", "YES", default="NO"
+ ):
+ cflags.append("-mssse3") # Note 3rd 's'.
+ if self._Test("GCC_ENABLE_SSE41_EXTENSIONS", "YES", default="NO"):
+ cflags.append("-msse4.1")
+ if self._Test("GCC_ENABLE_SSE42_EXTENSIONS", "YES", default="NO"):
+ cflags.append("-msse4.2")
cflags += self._Settings().get("WARNING_CFLAGS", [])
@@ -938,16 +942,17 @@ class XcodeSettings(object):
+ gyp_to_build_path(self._Settings()["ORDER_FILE"])
)
- if arch is not None:
- archs = [arch]
- else:
- assert self.configname
- archs = self.GetActiveArchs(self.configname)
- if len(archs) != 1:
- # TODO: Supporting fat binaries will be annoying.
- self._WarnUnimplemented("ARCHS")
- archs = ["i386"]
- ldflags.append("-arch " + archs[0])
+ if not gyp.common.CrossCompileRequested():
+ if arch is not None:
+ archs = [arch]
+ else:
+ assert self.configname
+ archs = self.GetActiveArchs(self.configname)
+ if len(archs) != 1:
+ # TODO: Supporting fat binaries will be annoying.
+ self._WarnUnimplemented("ARCHS")
+ archs = ["i386"]
+ ldflags.append("-arch " + archs[0])
# Xcode adds the product directory by default.
# Rewrite -L. to -L./ to work around http://www.openradar.me/25313838
diff --git a/tools/gyp/setup.py b/tools/gyp/setup.py
index d1869c1b520..766a7651ba0 100755..100644
--- a/tools/gyp/setup.py
+++ b/tools/gyp/setup.py
@@ -15,7 +15,7 @@ with open(path.join(here, "README.md")) as in_file:
setup(
name="gyp-next",
- version="0.6.2",
+ version="0.7.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",
diff --git a/tools/js2c.py b/tools/js2c.py
index 0f073e182bd..dd3ff9d5ca9 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -123,7 +123,7 @@ def AddModule(filename, definitions, initializers):
initializers.append(initializer)
def NormalizeFileName(filename):
- split = filename.split(os.path.sep)
+ split = filename.split('/')
if split[0] == 'deps':
split = ['internal'] + split
else: # `lib/**/*.js` so drop the 'lib' part