Skip to content

Commit 91385be

Browse files
danbevMylesBorins
authored andcommitted
build: fix cctest target --with-dtrace
Currently the cctest target will fail on linux when configured --with-dtrace: /node-v9.2.0/out/Release/obj.target/node/src/node_dtrace.o: In function `node::DTRACE_NET_SERVER_CONNECTION( v8::FunctionCallbackInfo<v8::Value> const&)': node_dtrace.cc:(.text+0x103): undefined reference to `node_net__server__connection_semaphore' /node-v9.2.0/out/Release/obj.target/node/src/node_dtrace.o: In function `node::DTRACE_NET_STREAM_END( v8::FunctionCallbackInfo<v8::Value> const&)': ... This is because node_dtrace_provider.o is not linked by the cctest target. This commit tries to fix and simplify the conditions in cctest target so that node_dtrace.o is included for all operating systems that support dtrace, include node_dtrace_ustack.o for all operating systems except mac and linux, and include node_dtrace_provider.o for all operating systems except mac. PR-URL: #17039 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 17e31dc commit 91385be

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

node.gyp

+14-11
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,20 @@
879879
[ 'node_use_dtrace=="true"', {
880880
'libraries': [
881881
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace.<(OBJ_SUFFIX)',
882-
]
882+
],
883+
'conditions': [
884+
['OS!="mac" and OS!="linux"', {
885+
'libraries': [
886+
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_provider.<(OBJ_SUFFIX)',
887+
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_ustack.<(OBJ_SUFFIX)',
888+
]
889+
}],
890+
['OS=="linux"', {
891+
'libraries': [
892+
'<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o',
893+
]
894+
}],
895+
],
883896
}],
884897
[ 'OS=="win"', {
885898
'libraries': [
@@ -890,16 +903,6 @@
890903
'<(OBJ_PATH)<(OBJ_SEPARATOR)backtrace_posix.<(OBJ_SUFFIX)',
891904
],
892905
}],
893-
[ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
894-
'copies': [{
895-
'destination': '<(OBJ_DIR)/cctest/src',
896-
'files': [
897-
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_ustack.<(OBJ_SUFFIX)',
898-
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_provider.<(OBJ_SUFFIX)',
899-
'<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace.<(OBJ_SUFFIX)',
900-
]},
901-
],
902-
}],
903906
[ 'node_shared_zlib=="false"', {
904907
'dependencies': [
905908
'deps/zlib/zlib.gyp:zlib',

0 commit comments

Comments
 (0)