Skip to content

Commit 8c93499

Browse files
danbevMylesBorins
authored andcommitted
build: add node_lib_target_name to cctest deps
Currently the cctest target depend on the node_core_target_name target. But it is the node_lib_target_name target that compiles the sources now which means that if a source file in src is updated the cctest executable will not be re-linked against it, but will remain unchanged. The code will still be compiled, just not linked which means that if you are debugging you'll not see the changes and also a warning will be displayed about this issue. This commit changes the cctest target to depend on node_lib_target_name. Backport-PR-URL: #18550 PR-URL: #18576 Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Yihong Wang <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 189e566 commit 8c93499

File tree

3 files changed

+25
-158
lines changed

3 files changed

+25
-158
lines changed

node.gyp

+3-126
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@
907907
'type': 'executable',
908908

909909
'dependencies': [
910-
'<(node_core_target_name)',
910+
'<(node_lib_target_name)',
911911
'rename_node_bin_win',
912912
'deps/gtest/gtest.gyp:gtest',
913913
'node_js2c#host',
@@ -916,39 +916,6 @@
916916
'node_dtrace_provider',
917917
],
918918

919-
'variables': {
920-
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
921-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
922-
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)/src/tracing',
923-
'obj_suffix': 'o',
924-
'obj_separator': '/',
925-
'conditions': [
926-
['OS=="win"', {
927-
'obj_suffix': 'obj',
928-
}],
929-
['GENERATOR=="ninja"', {
930-
'obj_path': '<(obj_dir)/src',
931-
'obj_gen_path': '<(obj_dir)/gen',
932-
'obj_tracing_path': '<(obj_dir)/src/tracing',
933-
'obj_separator': '/<(node_lib_target_name).',
934-
}, {
935-
'conditions': [
936-
['OS=="win"', {
937-
'obj_path': '<(obj_dir)/<(node_lib_target_name)',
938-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)',
939-
'obj_tracing_path': '<(obj_dir)/<(node_lib_target_name)',
940-
}],
941-
['OS=="aix"', {
942-
'obj_path': '<(obj_dir)/<(node_lib_target_name)/src',
943-
'obj_gen_path': '<(obj_dir)/<(node_lib_target_name)/gen',
944-
'obj_tracing_path':
945-
'<(obj_dir)/<(node_lib_target_name)/src/tracing',
946-
}],
947-
]}
948-
]
949-
],
950-
},
951-
952919
'includes': [
953920
'node.gypi'
954921
],
@@ -965,7 +932,6 @@
965932
'defines': [ 'NODE_WANT_INTERNALS=1' ],
966933

967934
'sources': [
968-
'test/cctest/node_module_reg.cc',
969935
'test/cctest/node_test_fixture.cc',
970936
'test/cctest/test_aliased_buffer.cc',
971937
'test/cctest/test_base64.cc',
@@ -975,119 +941,30 @@
975941
'test/cctest/test_url.cc'
976942
],
977943

978-
'libraries': [
979-
'<(obj_path)<(obj_separator)async_wrap.<(obj_suffix)',
980-
'<(obj_path)<(obj_separator)handle_wrap.<(obj_suffix)',
981-
'<(obj_path)<(obj_separator)env.<(obj_suffix)',
982-
'<(obj_path)<(obj_separator)node.<(obj_suffix)',
983-
'<(obj_path)<(obj_separator)node_buffer.<(obj_suffix)',
984-
'<(obj_path)<(obj_separator)node_debug_options.<(obj_suffix)',
985-
'<(obj_path)<(obj_separator)node_i18n.<(obj_suffix)',
986-
'<(obj_path)<(obj_separator)node_perf.<(obj_suffix)',
987-
'<(obj_path)<(obj_separator)node_platform.<(obj_suffix)',
988-
'<(obj_path)<(obj_separator)node_url.<(obj_suffix)',
989-
'<(obj_path)<(obj_separator)util.<(obj_suffix)',
990-
'<(obj_path)<(obj_separator)string_bytes.<(obj_suffix)',
991-
'<(obj_path)<(obj_separator)string_search.<(obj_suffix)',
992-
'<(obj_path)<(obj_separator)stream_base.<(obj_suffix)',
993-
'<(obj_path)<(obj_separator)node_constants.<(obj_suffix)',
994-
'<(obj_tracing_path)<(obj_separator)agent.<(obj_suffix)',
995-
'<(obj_tracing_path)<(obj_separator)node_trace_buffer.<(obj_suffix)',
996-
'<(obj_tracing_path)<(obj_separator)node_trace_writer.<(obj_suffix)',
997-
'<(obj_tracing_path)<(obj_separator)trace_event.<(obj_suffix)',
998-
'<(obj_gen_path)<(obj_separator)node_javascript.<(obj_suffix)',
999-
],
1000-
1001944
'conditions': [
1002945
[ 'node_use_openssl=="true"', {
1003-
'conditions': [
1004-
['node_target_type!="static_library"', {
1005-
'libraries': [
1006-
'<(obj_path)<(obj_separator)node_crypto.<(obj_suffix)',
1007-
'<(obj_path)<(obj_separator)node_crypto_bio.<(obj_suffix)',
1008-
'<(obj_path)<(obj_separator)node_crypto_clienthello.<(obj_suffix)',
1009-
'<(obj_path)<(obj_separator)tls_wrap.<(obj_suffix)',
1010-
],
1011-
}],
1012-
],
1013946
'defines': [
1014947
'HAVE_OPENSSL=1',
1015948
],
1016949
}],
1017950
[ 'node_use_perfctr=="true"', {
1018951
'defines': [ 'HAVE_PERFCTR=1' ],
1019-
'libraries': [
1020-
'<(obj_path)<(obj_separator)node_counters.<(obj_suffix)',
1021-
'<(obj_path)<(obj_separator)'
1022-
'node_win32_perfctr_provider.<(obj_suffix)',
1023-
],
1024952
}],
1025953
['v8_enable_inspector==1', {
1026954
'sources': [
1027955
'test/cctest/test_inspector_socket.cc',
1028956
'test/cctest/test_inspector_socket_server.cc'
1029957
],
1030-
'conditions': [
1031-
['node_target_type!="static_library"', {
1032-
'libraries': [
1033-
'<(obj_path)<(obj_separator)inspector_agent.<(obj_suffix)',
1034-
'<(obj_path)<(obj_separator)inspector_io.<(obj_suffix)',
1035-
'<(obj_path)<(obj_separator)inspector_js_api.<(obj_suffix)',
1036-
'<(obj_path)<(obj_separator)inspector_socket.<(obj_suffix)',
1037-
'<(obj_path)<(obj_separator)inspector_socket_server.<(obj_suffix)',
1038-
],
1039-
}],
1040-
],
1041958
'defines': [
1042959
'HAVE_INSPECTOR=1',
1043960
],
1044-
}],
1045-
[ 'node_use_dtrace=="true" and node_target_type!="static_library"', {
1046-
'libraries': [
1047-
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
1048-
],
1049-
'conditions': [
1050-
['OS!="mac" and OS!="linux"', {
1051-
'libraries': [
1052-
'<(obj_path)<(obj_separator)node_dtrace_provider.<(obj_suffix)',
1053-
'<(obj_path)<(obj_separator)node_dtrace_ustack.<(obj_suffix)',
1054-
]
1055-
}],
1056-
['OS=="linux"', {
1057-
'libraries': [
1058-
'<(SHARED_INTERMEDIATE_DIR)<(obj_separator)'
1059-
'node_dtrace_provider.<(obj_suffix)',
1060-
]
1061-
}],
1062-
],
1063-
}, {
1064-
'conditions': [
1065-
[ 'node_use_etw=="true" and OS=="win"', {
1066-
'libraries': [
1067-
'<(obj_path)<(obj_separator)node_dtrace.<(obj_suffix)',
1068-
'<(obj_path)<(obj_separator)'
1069-
'node_win32_etw_provider.<(obj_suffix)',
1070-
],
1071-
}]
1072-
]
1073-
}],
1074-
[ 'OS=="win" and node_target_type!="static_library"', {
1075-
'libraries': [
1076-
'<(obj_path)<(obj_separator)backtrace_win32.<(obj_suffix)',
1077-
],
1078961
}, {
1079-
'conditions': [
1080-
['node_target_type!="static_library"', {
1081-
'libraries': [
1082-
'<(obj_path)<(obj_separator)backtrace_posix.<(obj_suffix)',
1083-
],
1084-
}],
1085-
],
962+
'defines': [ 'HAVE_INSPECTOR=0' ]
1086963
}],
1087964
['OS=="solaris"', {
1088965
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
1089966
}],
1090-
]
967+
],
1091968
}
1092969
], # end targets
1093970

test/cctest/node_module_reg.cc

-30
This file was deleted.

test/cctest/test_node_postmortem_metadata.cc

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
1-
#include "node_postmortem_metadata.cc"
2-
31
#include "gtest/gtest.h"
42
#include "node.h"
53
#include "node_internals.h"
64
#include "node_test_fixture.h"
75
#include "req_wrap-inl.h"
86
#include "tracing/agent.h"
97
#include "v8.h"
8+
#include "v8abbr.h"
9+
10+
extern "C" {
11+
extern uintptr_t
12+
nodedbg_offset_HandleWrap__handle_wrap_queue___ListNode_HandleWrap;
13+
extern uintptr_t
14+
nodedbg_offset_Environment__handle_wrap_queue___Environment_HandleWrapQueue;
15+
extern int debug_symbols_generated;
16+
extern int nodedbg_const_Environment__kContextEmbedderDataIndex__int;
17+
extern uintptr_t
18+
nodedbg_offset_Environment_HandleWrapQueue__head___ListNode_HandleWrap;
19+
extern uintptr_t
20+
nodedbg_offset_Environment__req_wrap_queue___Environment_ReqWrapQueue;
21+
extern uintptr_t nodedbg_offset_ExternalString__data__uintptr_t;
22+
extern uintptr_t nodedbg_offset_ListNode_ReqWrap__next___uintptr_t;
23+
extern uintptr_t nodedbg_offset_ReqWrap__req_wrap_queue___ListNode_ReqWrapQueue;
24+
extern uintptr_t nodedbg_offset_ListNode_HandleWrap__next___uintptr_t;
25+
extern uintptr_t
26+
nodedbg_offset_Environment_ReqWrapQueue__head___ListNode_ReqWrapQueue;
27+
extern uintptr_t
28+
nodedbg_offset_BaseObject__persistent_handle___v8_Persistent_v8_Object;
29+
}
1030

1131

1232
class DebugSymbolsTest : public EnvironmentTestFixture {};

0 commit comments

Comments
 (0)