Skip to content

Commit 16af467

Browse files
Stewart AddisonMyles Borins
Stewart Addison
authored and
Myles Borins
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: 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 e9c2ffd commit 16af467

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

configure

+8-1
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,14 @@ def configure_node(o):
848848
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
849849
o['variables']['node_shared'] = b(options.shared)
850850
node_module_version = getmoduleversion.get_version()
851-
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'
851+
852+
if sys.platform == 'darwin':
853+
shlib_suffix = '%s.dylib'
854+
elif sys.platform.startswith('aix'):
855+
shlib_suffix = '%s.a'
856+
else:
857+
shlib_suffix = 'so.%s'
858+
852859
shlib_suffix %= node_module_version
853860
o['variables']['node_module_version'] = int(node_module_version)
854861
o['variables']['shlib_suffix'] = shlib_suffix

node.gyp

+9-1
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,15 @@
928928
'targets': [
929929
{
930930
'target_name': 'node',
931-
'type': 'executable',
931+
'conditions': [
932+
['node_shared=="true"', {
933+
'type': 'shared_library',
934+
'ldflags': ['--shared'],
935+
'product_extension': '<(shlib_suffix)',
936+
}, {
937+
'type': 'executable',
938+
}],
939+
],
932940
'dependencies': ['<(node_core_target_name)', 'node_exp'],
933941

934942
'include_dirs': [

0 commit comments

Comments
 (0)