Skip to content

Commit

Permalink
build: refine static and shared lib build
Browse files Browse the repository at this point in the history
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]>

Refs: #14158
PR-URL: #17604
Reviewed-By: Bartosz Sosnowski <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
  • Loading branch information
yhwang authored and MylesBorins committed Mar 30, 2018
1 parent e0d2842 commit 658dd40
Show file tree
Hide file tree
Showing 5 changed files with 358 additions and 300 deletions.
11 changes: 8 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,6 @@ def configure_node(o):
configure_mips(o)

if flavor == 'aix':
o['variables']['node_core_target_name'] = 'node_base'
o['variables']['node_target_type'] = 'static_library'

if target_arch in ('x86', 'x64', 'ia32', 'x32'):
Expand Down Expand Up @@ -991,6 +990,13 @@ def configure_node(o):
else:
o['variables']['coverage'] = 'false'

if options.shared:
o['variables']['node_target_type'] = 'shared_library'
elif options.enable_static:
o['variables']['node_target_type'] = 'static_library'
else:
o['variables']['node_target_type'] = 'executable'

def configure_library(lib, output):
shared_lib = 'shared_' + lib
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
Expand Down Expand Up @@ -1487,8 +1493,7 @@ config = {
'BUILDTYPE': 'Debug' if options.debug else 'Release',
'USE_XCODE': str(int(options.use_xcode or 0)),
'PYTHON': sys.executable,
'NODE_TARGET_TYPE': variables['node_target_type'] if options.enable_static \
else '',
'NODE_TARGET_TYPE': variables['node_target_type'],
}

if options.prefix:
Expand Down
Loading

0 comments on commit 658dd40

Please sign in to comment.