build: don't add libraries when --enable-static
Currently when building with --enabled-static the cctest target will include libraries to be linked regardless. This commit adds a condition to only add the libraries when dynamically linking. This commit re-adds the previously reverted commit (be63c26e8c "build: don't add libraries when --enable-static"). The reason that commit failed was a mistake on my part where I moved the the list into a variable (thinking that it was a simple change that would not affect anything) and not re-running CI. But the list itself contains variables used to enable differences in operating systems/compilers where the object file locations vary. PR-URL: https://github.com/nodejs/node/pull/14912 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
parent
f6caeb9526
commit
58ca8c68c4
35
node.gyp
35
node.gyp
@ -632,6 +632,23 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
|
||||
],
|
||||
|
||||
'defines': [ 'NODE_WANT_INTERNALS=1' ],
|
||||
|
||||
'sources': [
|
||||
'src/node_platform.cc',
|
||||
'src/node_platform.h',
|
||||
'test/cctest/test_base64.cc',
|
||||
'test/cctest/test_environment.cc',
|
||||
'test/cctest/test_util.cc',
|
||||
'test/cctest/test_url.cc'
|
||||
],
|
||||
|
||||
'sources!': [
|
||||
'src/node_main.cc'
|
||||
],
|
||||
|
||||
'conditions': [
|
||||
['node_target_type!="static_library"', {
|
||||
'libraries': [
|
||||
'<(OBJ_GEN_PATH)<(OBJ_SEPARATOR)node_javascript.<(OBJ_SUFFIX)',
|
||||
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_debug_options.<(OBJ_SUFFIX)',
|
||||
@ -651,23 +668,7 @@
|
||||
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_writer.<(OBJ_SUFFIX)',
|
||||
'<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)trace_event.<(OBJ_SUFFIX)',
|
||||
],
|
||||
|
||||
'defines': [ 'NODE_WANT_INTERNALS=1' ],
|
||||
|
||||
'sources': [
|
||||
'src/node_platform.cc',
|
||||
'src/node_platform.h',
|
||||
'test/cctest/test_base64.cc',
|
||||
'test/cctest/test_environment.cc',
|
||||
'test/cctest/test_util.cc',
|
||||
'test/cctest/test_url.cc'
|
||||
],
|
||||
|
||||
'sources!': [
|
||||
'src/node_main.cc'
|
||||
],
|
||||
|
||||
'conditions': [
|
||||
}],
|
||||
['v8_enable_inspector==1', {
|
||||
'sources': [
|
||||
'test/cctest/test_inspector_socket.cc',
|
||||
|
Loading…
x
Reference in New Issue
Block a user