Skip to content

Commit

Permalink
gyp,build: consistent shared library location
Browse files Browse the repository at this point in the history
Ref: nodejs/node-gyp#2233
Ref: nodejs/gyp-next#69

PR-URL: #35635
Refs: https://github.com/nodejs/gyp-next/releases/tag/v0.6.0
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
rvagg authored and BethGriggs committed Dec 7, 2020
1 parent baca8ee commit e2b8734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
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
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

0 comments on commit e2b8734

Please sign in to comment.