build: add correct shared library naming on OS X
The build system currently creates a shared library on OS X with the same name as on Linux i.e. libnode.so.48. This is inconsistent with the conventions on OS X which uses libnode.48.so This commit changes the build process and install.py (used by make binary) to build with the correct name on OS X when the --shared configure parameter is used. PR-URL: https://github.com/nodejs/node/pull/7687 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
e03a7b2a2b
commit
a7222052d4
6
configure
vendored
6
configure
vendored
@ -840,7 +840,11 @@ def configure_node(o):
|
|||||||
|
|
||||||
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
|
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
|
||||||
o['variables']['node_shared'] = b(options.shared)
|
o['variables']['node_shared'] = b(options.shared)
|
||||||
o['variables']['node_module_version'] = int(getmoduleversion.get_version())
|
node_module_version = getmoduleversion.get_version()
|
||||||
|
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'
|
||||||
|
shlib_suffix %= node_module_version
|
||||||
|
o['variables']['node_module_version'] = int(node_module_version)
|
||||||
|
o['variables']['shlib_suffix'] = shlib_suffix
|
||||||
|
|
||||||
if options.linked_module:
|
if options.linked_module:
|
||||||
o['variables']['library_files'] = options.linked_module
|
o['variables']['library_files'] = options.linked_module
|
||||||
|
2
node.gyp
2
node.gyp
@ -249,7 +249,7 @@
|
|||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
[ 'node_module_version!="" and OS!="win"', {
|
[ 'node_module_version!="" and OS!="win"', {
|
||||||
'product_extension': 'so.<(node_module_version)',
|
'product_extension': '<(shlib_suffix)',
|
||||||
}]
|
}]
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
@ -118,10 +118,11 @@ def files(action):
|
|||||||
if is_windows:
|
if is_windows:
|
||||||
output_file += '.dll'
|
output_file += '.dll'
|
||||||
else:
|
else:
|
||||||
# GYP will output to lib.target, this is hardcoded in its source,
|
output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
|
||||||
# see the _InstallableTargetInstallPath function.
|
# GYP will output to lib.target except on OS X, this is hardcoded
|
||||||
output_prefix += 'lib.target/'
|
# in its source - see the _InstallableTargetInstallPath function.
|
||||||
output_file = 'lib' + output_file + '.so.' + get_version()
|
if sys.platform != 'darwin':
|
||||||
|
output_prefix += 'lib.target/'
|
||||||
|
|
||||||
action([output_prefix + output_file], 'bin/' + output_file)
|
action([output_prefix + output_file], 'bin/' + output_file)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user