Skip to content

Commit 8427ec6

Browse files
yhwangMylesBorins
authored andcommitted
build: refine static and shared lib build
Refine the static and shared lib build process in order to integrate static and shared lib verfication into CI. When building both static and shared lib, we still build node executable now and it uses the shared and static lib. Signed-off-by: Yihong Wang <yh.wang@ibm.com> Refs: #14158 Backport-PR-URL: #19050 PR-URL: #17604 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent f341a00 commit 8427ec6

File tree

4 files changed

+479
-251
lines changed

4 files changed

+479
-251
lines changed

configure

+8-1
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,6 @@ def configure_node(o):
845845
configure_mips(o)
846846

847847
if flavor == 'aix':
848-
o['variables']['node_core_target_name'] = 'node_base'
849848
o['variables']['node_target_type'] = 'static_library'
850849

851850
if target_arch in ('x86', 'x64', 'ia32', 'x32'):
@@ -945,6 +944,13 @@ def configure_node(o):
945944
else:
946945
o['variables']['coverage'] = 'false'
947946

947+
if options.shared:
948+
o['variables']['node_target_type'] = 'shared_library'
949+
elif options.enable_static:
950+
o['variables']['node_target_type'] = 'static_library'
951+
else:
952+
o['variables']['node_target_type'] = 'executable'
953+
948954
def configure_library(lib, output):
949955
shared_lib = 'shared_' + lib
950956
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
@@ -1440,6 +1446,7 @@ config = {
14401446
'BUILDTYPE': 'Debug' if options.debug else 'Release',
14411447
'USE_XCODE': str(int(options.use_xcode or 0)),
14421448
'PYTHON': sys.executable,
1449+
'NODE_TARGET_TYPE': variables['node_target_type'],
14431450
}
14441451

14451452
if options.prefix:

0 commit comments

Comments
 (0)