Skip to content

Commit 168241a

Browse files
Stewart AddisonMylesBorins
authored andcommitted
build: add shared library support to AIX build
Updates to build the shared library version of node on AIX. Adds the same functionality to AIX that was added on Linux under this: Ref: #6994 PR-URL: #9675 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 1022212 commit 168241a

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

configure

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,14 @@ def configure_node(o):
841841
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
842842
o['variables']['node_shared'] = b(options.shared)
843843
node_module_version = getmoduleversion.get_version()
844-
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'
844+
845+
if sys.platform == 'darwin':
846+
shlib_suffix = '%s.dylib'
847+
elif sys.platform.startswith('aix'):
848+
shlib_suffix = '%s.a'
849+
else:
850+
shlib_suffix = 'so.%s'
851+
845852
shlib_suffix %= node_module_version
846853
o['variables']['node_module_version'] = int(node_module_version)
847854
o['variables']['shlib_suffix'] = shlib_suffix

node.gyp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,15 @@
916916
'targets': [
917917
{
918918
'target_name': 'node',
919-
'type': 'executable',
919+
'conditions': [
920+
['node_shared=="true"', {
921+
'type': 'shared_library',
922+
'ldflags': ['--shared'],
923+
'product_extension': '<(shlib_suffix)',
924+
}, {
925+
'type': 'executable',
926+
}],
927+
],
920928
'dependencies': ['<(node_core_target_name)', 'node_exp'],
921929

922930
'include_dirs': [

0 commit comments

Comments
 (0)