镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Commit f2b0098

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 <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 52f1493 commit f2b0098

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎configure‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,14 @@ def configure_node(o):
802802
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
803803
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
804804
node_module_version = getmoduleversion.get_version()
805-
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'
805+
806+
if sys.platform == 'darwin':
807+
shlib_suffix = '%s.dylib'
808+
elif sys.platform.startswith('aix'):
809+
shlib_suffix = '%s.a'
810+
else:
811+
shlib_suffix = 'so.%s'
812+
806813
shlib_suffix %= node_module_version
807814
o['variables']['node_module_version'] = int(node_module_version)
808815
o['variables']['shlib_suffix'] = shlib_suffix

‎node.gyp‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,15 @@
811811
'targets': [
812812
{
813813
'target_name': 'node',
814-
'type': 'executable',
814+
'conditions': [
815+
['node_shared=="true"', {
816+
'type': 'shared_library',
817+
'ldflags': ['--shared'],
818+
'product_extension': '<(shlib_suffix)',
819+
}, {
820+
'type': 'executable',
821+
}],
822+
],
815823
'dependencies': ['<(node_core_target_name)', 'node_exp'],
816824

817825
'include_dirs': [

0 commit comments

Comments
 (0)