Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: update gyp-next to v0.6.0 #35635

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions test/common/shared-lib-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ function addLibraryPath(env) {

env.LD_LIBRARY_PATH =
(env.LD_LIBRARY_PATH ? env.LD_LIBRARY_PATH + path.delimiter : '') +
path.join(kExecPath, 'lib.target');
kExecPath;
// For AIX.
env.LIBPATH =
(env.LIBPATH ? env.LIBPATH + path.delimiter : '') +
path.join(kExecPath, 'lib.target');
kExecPath;
// For Mac OSX.
env.DYLD_LIBRARY_PATH =
(env.DYLD_LIBRARY_PATH ? env.DYLD_LIBRARY_PATH + path.delimiter : '') +
Expand All @@ -34,10 +34,8 @@ function addLibraryPath(env) {
function getSharedLibPath() {
if (common.isWindows) {
return path.join(kExecPath, 'node.dll');
} else if (common.isOSX) {
return path.join(kExecPath, `libnode.${kShlibSuffix}`);
}
return path.join(kExecPath, 'lib.target', `libnode.${kShlibSuffix}`);
return path.join(kExecPath, `libnode.${kShlibSuffix}`);
}

// Get the binary path of stack frames.
Expand Down
2 changes: 1 addition & 1 deletion tools/gyp/.github/workflows/Python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
max-parallel: 15
matrix:
os: [macos-latest, ubuntu-latest] # , windows-latest]
python-version: [2.7, 3.6, 3.7, 3.8, 3.9.0-rc.1] # 3.5,
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
9 changes: 8 additions & 1 deletion tools/gyp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [0.6.0] - 2020-10-13

### Added
- The Makefile generator will now output shared libraries directly to the product
directory on all platforms (previously only macOS).

## [0.5.0] - 2020-09-30

### Added
Expand Down Expand Up @@ -46,7 +52,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
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.

[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.5.0...HEAD
[Unreleased]: https://github.com/nodejs/gyp-next/compare/v0.6.0...HEAD
[0.6.0]: https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0
Expand Down
20 changes: 10 additions & 10 deletions tools/gyp/pylib/gyp/generator/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -1621,10 +1621,8 @@ def WriteTarget(
if any(dep.endswith(".so") or ".so." in dep for dep in deps):
# We want to get the literal string "$ORIGIN"
# into the link command, so we need lots of escaping.
ldflags.append(r"-Wl,-rpath=\$$ORIGIN/lib.%s/" % self.toolset)
ldflags.append(
r"-Wl,-rpath-link=\$(builddir)/lib.%s/" % self.toolset
)
ldflags.append(r"-Wl,-rpath=\$$ORIGIN/")
ldflags.append(r"-Wl,-rpath-link=\$(builddir)/")
library_dirs = config.get("library_dirs", [])
ldflags += [("-L%s" % library_dir) for library_dir in library_dirs]
self.WriteList(ldflags, "LDFLAGS_%s" % configname)
Expand Down Expand Up @@ -2172,14 +2170,16 @@ def ExpandInputRoot(self, template, expansion, dirname):

def _InstallableTargetInstallPath(self):
"""Returns the location of the final output for an installable target."""
# Functionality removed for all platforms to match Xcode and hoist
# shared libraries into PRODUCT_DIR for users:
# Xcode puts shared_library results into PRODUCT_DIR, and some gyp files
# rely on this. Emulate this behavior for mac.
if self.type == "shared_library" and (
self.flavor != "mac" or self.toolset != "target"
):
# Install all shared libs into a common directory (per toolset) for
# convenient access with LD_LIBRARY_PATH.
return "$(builddir)/lib.%s/%s" % (self.toolset, self.alias)
# if self.type == "shared_library" and (
# self.flavor != "mac" or self.toolset != "target"
# ):
# # Install all shared libs into a common directory (per toolset) for
# # convenient access with LD_LIBRARY_PATH.
# return "$(builddir)/lib.%s/%s" % (self.toolset, self.alias)
return "$(builddir)/" + self.alias


Expand Down
2 changes: 1 addition & 1 deletion tools/gyp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="gyp-next",
version="0.5.0",
version="0.6.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",
Expand Down
4 changes: 0 additions & 4 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ def files(action):
output_file += '.dll'
else:
output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
# GYP will output to lib.target except on OS X, this is hardcoded
# in its source - see the _InstallableTargetInstallPath function.
if sys.platform != 'darwin':
output_prefix += 'lib.target/'

if 'false' == variables.get('node_shared'):
action([output_prefix + output_file], 'bin/' + output_file)
Expand Down