Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b0a557e

Browse filesBrowse files
Stewart Addisoncjihrig
authored andcommitted
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: #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> Conflicts: node.gyp
1 parent 6ed4ea8 commit b0a557e
Copy full SHA for b0a557e

File tree

Expand file treeCollapse file tree

3 files changed

+11
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+11
-6
lines changed
Open diff view settings
Collapse file

‎configure‎

Copy file name to clipboardExpand all lines: configure
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,11 @@ def configure_node(o):
840840

841841
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
842842
o['variables']['node_shared'] = b(options.shared)
843-
o['variables']['node_module_version'] = int(getmoduleversion.get_version())
843+
node_module_version = getmoduleversion.get_version()
844+
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'
845+
shlib_suffix %= node_module_version
846+
o['variables']['node_module_version'] = int(node_module_version)
847+
o['variables']['shlib_suffix'] = shlib_suffix
844848

845849
if options.linked_module:
846850
o['variables']['library_files'] = options.linked_module
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
],
249249
'conditions': [
250250
[ 'node_module_version!=""', {
251-
'product_extension': 'so.<(node_module_version)',
251+
'product_extension': '<(shlib_suffix)',
252252
}]
253253
],
254254
}],
Collapse file

‎tools/install.py‎

Copy file name to clipboardExpand all lines: tools/install.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,11 @@ def files(action):
118118
if is_windows:
119119
output_file += '.dll'
120120
else:
121-
# GYP will output to lib.target, this is hardcoded in its source,
122-
# see the _InstallableTargetInstallPath function.
123-
output_prefix += 'lib.target/'
124-
output_file = 'lib' + output_file + '.so.' + get_version()
121+
output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
122+
# GYP will output to lib.target except on OS X, this is hardcoded
123+
# in its source - see the _InstallableTargetInstallPath function.
124+
if sys.platform != 'darwin':
125+
output_prefix += 'lib.target/'
125126

126127
action([output_prefix + output_file], 'bin/' + output_file)
127128

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.