Skip to content

Commit

Permalink
build: add shared library support to AIX build
Browse files Browse the repository at this point in the history
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: nodejs#6994

PR-URL: nodejs#9675
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
Stewart Addison committed Nov 23, 2016
1 parent fe08594 commit aeff49d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -801,14 +801,13 @@ def configure_node(o):
o['variables']['node_shared'] = b(options.shared)
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
o['variables']['node_shared'] = b(options.shared)
node_module_version = getmoduleversion.get_version()

if sys.platform == 'darwin':
shlib_suffix = '%s.dylib'
elif sys.platform.startswith('aix'):
shlib_suffix = '%s.a'
shlib_suffix = '%s.a'
else:
shlib_suffix = 'so.%s'

Expand Down
11 changes: 4 additions & 7 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -810,20 +810,16 @@
['OS=="aix"', {
'targets': [
{
'target_name': 'node',
'conditions': [
['node_shared=="true"', {
'target_name': 'libnode.<(node_module_version)',
'ldflags': ['--shared'],
'type': 'shared_library',
'ldflags': ['--shared'],
'product_extension': '<(shlib_suffix)',
}, {
'target_name': 'node',
'type': 'executable',
'sources': ['src/node_main.cc'],
}],
],

'target_name': 'node',
'type': 'executable',
'dependencies': ['<(node_core_target_name)', 'node_exp'],

'include_dirs': [
Expand All @@ -832,6 +828,7 @@
],

'sources': [
'src/node_main.cc',
'<@(library_files)',
# node.gyp is added to the project by default.
'common.gypi',
Expand Down

0 comments on commit aeff49d

Please sign in to comment.