Skip to content

Commit 45684a1

Browse files
author
Stewart Addison
committed
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: PR-URL: nodejs#9675 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 0e1e908 commit 45684a1

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
@@ -843,7 +843,14 @@ def configure_node(o):
843843
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
844844
o['variables']['node_shared'] = b(options.shared)
845845
node_module_version = getmoduleversion.get_version()
846-
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'
846+
847+
if sys.platform == 'darwin':
848+
shlib_suffix = '%s.dylib'
849+
elif sys.platform.startswith('aix'):
850+
shlib_suffix = '%s.a'
851+
else:
852+
shlib_suffix = 'so.%s'
853+
847854
shlib_suffix %= node_module_version
848855
o['variables']['node_module_version'] = int(node_module_version)
849856
o['variables']['shlib_suffix'] = shlib_suffix

node.gyp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,15 @@
919919
'targets': [
920920
{
921921
'target_name': 'node',
922-
'type': 'executable',
922+
'conditions': [
923+
['node_shared=="true"', {
924+
'type': 'shared_library',
925+
'ldflags': ['--shared'],
926+
'product_extension': '<(shlib_suffix)',
927+
}, {
928+
'type': 'executable',
929+
}],
930+
],
923931
'dependencies': ['<(node_core_target_name)', 'node_exp'],
924932

925933
'include_dirs': [

0 commit comments

Comments
 (0)