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: #6994

PR-URL: #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 authored and MylesBorins committed Dec 21, 2016
1 parent 7500f89 commit 2cd4a7f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,14 @@ def configure_node(o):
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
node_module_version = getmoduleversion.get_version()
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'

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

shlib_suffix %= node_module_version
o['variables']['node_module_version'] = int(node_module_version)
o['variables']['shlib_suffix'] = shlib_suffix
Expand Down
10 changes: 9 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,15 @@
'targets': [
{
'target_name': 'node',
'type': 'executable',
'conditions': [
['node_shared=="true"', {
'type': 'shared_library',
'ldflags': ['--shared'],
'product_extension': '<(shlib_suffix)',
}, {
'type': 'executable',
}],
],
'dependencies': ['<(node_core_target_name)', 'node_exp'],

'include_dirs': [
Expand Down

0 comments on commit 2cd4a7f

Please sign in to comment.