Skip to content

Commit 50754c3

Browse files
committed
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 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 fdf73b1 commit 50754c3

File tree

4 files changed

+479
-251
lines changed

4 files changed

+479
-251
lines changed

configure

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ def configure_node(o):
842842
configure_mips(o)
843843

844844
if flavor == 'aix':
845-
o['variables']['node_core_target_name'] = 'node_base'
846845
o['variables']['node_target_type'] = 'static_library'
847846

848847
if target_arch in ('x86', 'x64', 'ia32', 'x32'):
@@ -942,6 +941,13 @@ def configure_node(o):
942941
else:
943942
o['variables']['coverage'] = 'false'
944943

944+
if options.shared:
945+
o['variables']['node_target_type'] = 'shared_library'
946+
elif options.enable_static:
947+
o['variables']['node_target_type'] = 'static_library'
948+
else:
949+
o['variables']['node_target_type'] = 'executable'
950+
945951
def configure_library(lib, output):
946952
shared_lib = 'shared_' + lib
947953
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
@@ -1437,6 +1443,7 @@ config = {
14371443
'BUILDTYPE': 'Debug' if options.debug else 'Release',
14381444
'USE_XCODE': str(int(options.use_xcode or 0)),
14391445
'PYTHON': sys.executable,
1446+
'NODE_TARGET_TYPE': variables['node_target_type'],
14401447
}
14411448

14421449
if options.prefix:

0 commit comments

Comments
 (0)