Skip to content

Commit f81c622

Browse files
yhwangevanlucas
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 <[email protected]> Fixes: #14158 PR-URL: #17604 Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
1 parent 2c4e021 commit f81c622

File tree

5 files changed

+358
-298
lines changed

5 files changed

+358
-298
lines changed

configure

+8-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,6 @@ def configure_node(o):
878878
configure_mips(o)
879879

880880
if flavor == 'aix':
881-
o['variables']['node_core_target_name'] = 'node_base'
882881
o['variables']['node_target_type'] = 'static_library'
883882

884883
if target_arch in ('x86', 'x64', 'ia32', 'x32'):
@@ -988,6 +987,13 @@ def configure_node(o):
988987
else:
989988
o['variables']['coverage'] = 'false'
990989

990+
if options.shared:
991+
o['variables']['node_target_type'] = 'shared_library'
992+
elif options.enable_static:
993+
o['variables']['node_target_type'] = 'static_library'
994+
else:
995+
o['variables']['node_target_type'] = 'executable'
996+
991997
def configure_library(lib, output):
992998
shared_lib = 'shared_' + lib
993999
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
@@ -1484,6 +1490,7 @@ config = {
14841490
'BUILDTYPE': 'Debug' if options.debug else 'Release',
14851491
'USE_XCODE': str(int(options.use_xcode or 0)),
14861492
'PYTHON': sys.executable,
1493+
'NODE_TARGET_TYPE': variables['node_target_type'],
14871494
}
14881495

14891496
if options.prefix:

0 commit comments

Comments
 (0)