build,v8: sync V8 gypfiles with 7.5 · nodejs/node@5101e4c · GitHub
Skip to content

Commit 5101e4c

Browse files
refacktargos
authored andcommitted
build,v8: sync V8 gypfiles with 7.5
Co-authored-by: Ujjwal Sharma <usharma1998@gmail.com> Co-authored-by: Michaël Zasso <targos@protonmail.com> Backport-PR-URL: #28005 PR-URL: #27375 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 21bcfb6 commit 5101e4c

8 files changed

Lines changed: 1499 additions & 965 deletions

File tree

common.gypi

Lines changed: 21 additions & 26 deletions

configure.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,13 @@ def b(value):
615615
else:
616616
return 'false'
617617

618+
def B(value):
619+
"""Returns 1 if value is truthy, 0 otherwise."""
620+
if value:
621+
return 1
622+
else:
623+
return 0
624+
618625

619626
def pkg_config(pkg):
620627
"""Run pkg-config on the specified package
@@ -1594,6 +1601,7 @@ def make_bin_override():
15941601
# move everything else to target_defaults
15951602
variables = output['variables']
15961603
del output['variables']
1604+
variables['is_debug'] = B(options.debug)
15971605

15981606
# make_global_settings for special FIPS linking
15991607
# should not be used to compile modules in node-gyp

node.gyp

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -344,22 +344,24 @@
344344
[ 'node_intermediate_lib_type=="static_library" and node_shared=="false"', {
345345
'xcode_settings': {
346346
'OTHER_LDFLAGS': [
347-
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)'
348-
'<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
347+
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
348+
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
349349
],
350350
},
351351
'msvs_settings': {
352352
'VCLinkerTool': {
353353
'AdditionalOptions': [
354354
'/WHOLEARCHIVE:<(node_lib_target_name)<(STATIC_LIB_SUFFIX)',
355+
'/WHOLEARCHIVE:<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
355356
],
356357
},
357358
},
358359
'conditions': [
359-
['OS!="aix"', {
360+
['OS != "aix" and OS != "mac"', {
360361
'ldflags': [
361-
'-Wl,--whole-archive,<(obj_dir)/<(STATIC_LIB_PREFIX)'
362-
'<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
362+
'-Wl,--whole-archive',
363+
'<(obj_dir)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
364+
'<(obj_dir)/tools/v8_gypfiles/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
363365
'-Wl,--no-whole-archive',
364366
],
365367
}],
@@ -386,10 +388,12 @@
386388
'NODE_ARCH="<(target_arch)"',
387389
'NODE_PLATFORM="<(OS)"',
388390
],
389-
'conditions': [
390-
['OS=="win"', {
391-
'libraries': [ 'Ws2_32' ],
392-
}],
391+
}],
392+
['OS=="win"', {
393+
'libraries': [
394+
'Dbghelp.lib',
395+
'winmm.lib',
396+
'Ws2_32.lib',
393397
],
394398
}],
395399
['node_with_ltcg=="true"', {
@@ -986,7 +990,7 @@
986990
{
987991
'action_name': 'node_dtrace_ustack_constants',
988992
'inputs': [
989-
'<(v8_base)'
993+
'<(obj_dir)/tools/v8_gypfiles/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)'
990994
],
991995
'outputs': [
992996
'<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
@@ -1141,8 +1145,16 @@
11411145
}],
11421146
],
11431147
}],
1148+
['OS=="win"', {
1149+
'libraries': [
1150+
'Dbghelp.lib',
1151+
'winmm.lib',
1152+
'Ws2_32.lib',
1153+
],
1154+
}],
11441155
],
11451156
}, # cctest
1157+
11461158
# TODO(joyeecheung): do not depend on node_lib,
11471159
# instead create a smaller static library node_lib_base that does
11481160
# just enough for node_native_module.cc and the cache builder to
@@ -1182,20 +1194,12 @@
11821194
],
11831195

11841196
'conditions': [
1185-
[ 'node_report=="true"', {
1186-
'conditions': [
1187-
['OS=="win"', {
1188-
'libraries': [
1189-
'dbghelp.lib',
1190-
'PsApi.lib',
1191-
'Ws2_32.lib',
1192-
],
1193-
'dll_files': [
1194-
'dbghelp.dll',
1195-
'PsApi.dll',
1196-
'Ws2_32.dll',
1197-
],
1198-
}],
1197+
['OS=="win"', {
1198+
'libraries': [
1199+
'dbghelp.lib',
1200+
'PsApi.lib',
1201+
'winmm.lib',
1202+
'Ws2_32.lib',
11991203
],
12001204
}],
12011205
],
@@ -1232,11 +1236,11 @@
12321236
],
12331237

12341238
'conditions': [
1235-
[ 'node_report=="true"', {
1236-
'conditions': [
1237-
['OS=="win"', {
1238-
'libraries': [ 'Ws2_32' ],
1239-
}],
1239+
['OS=="win"', {
1240+
'libraries': [
1241+
'Dbghelp.lib',
1242+
'winmm.lib',
1243+
'Ws2_32.lib',
12401244
],
12411245
}],
12421246
],

node.gypi

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
}],
7171
[ 'node_use_bundled_v8=="true"', {
7272
'dependencies': [
73-
'tools/v8_gypfiles/v8.gyp:v8',
73+
'tools/v8_gypfiles/v8.gyp:v8_snapshot',
7474
'tools/v8_gypfiles/v8.gyp:v8_libplatform',
7575
],
7676
}],
@@ -116,21 +116,13 @@
116116
[ 'node_no_browser_globals=="true"', {
117117
'defines': [ 'NODE_NO_BROWSER_GLOBALS' ],
118118
} ],
119-
[ 'node_use_bundled_v8=="true" and v8_postmortem_support==1 and force_load=="true"', {
120-
'xcode_settings': {
121-
'OTHER_LDFLAGS': [
122-
'-Wl,-force_load,<(v8_base)',
123-
],
124-
},
125-
}],
126119
[ 'node_shared_zlib=="false"', {
127120
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
128121
'conditions': [
129122
[ 'force_load=="true"', {
130123
'xcode_settings': {
131124
'OTHER_LDFLAGS': [
132-
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)'
133-
'zlib<(STATIC_LIB_SUFFIX)',
125+
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)zlib<(STATIC_LIB_SUFFIX)',
134126
],
135127
},
136128
'msvs_settings': {
@@ -143,7 +135,7 @@
143135
'conditions': [
144136
['OS!="aix" and node_shared=="false"', {
145137
'ldflags': [
146-
'-Wl,--whole-archive,'
138+
'-Wl,--whole-archive',
147139
'<(obj_dir)/deps/zlib/<(STATIC_LIB_PREFIX)zlib<(STATIC_LIB_SUFFIX)',
148140
'-Wl,--no-whole-archive',
149141
],
@@ -170,8 +162,7 @@
170162
[ 'force_load=="true"', {
171163
'xcode_settings': {
172164
'OTHER_LDFLAGS': [
173-
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)'
174-
'uv<(STATIC_LIB_SUFFIX)',
165+
'-Wl,-force_load,<(PRODUCT_DIR)/libuv<(STATIC_LIB_SUFFIX)',
175166
],
176167
},
177168
'msvs_settings': {
@@ -184,7 +175,7 @@
184175
'conditions': [
185176
['OS!="aix" and node_shared=="false"', {
186177
'ldflags': [
187-
'-Wl,--whole-archive,'
178+
'-Wl,--whole-archive',
188179
'<(obj_dir)/deps/uv/<(STATIC_LIB_PREFIX)uv<(STATIC_LIB_SUFFIX)',
189180
'-Wl,--no-whole-archive',
190181
],
@@ -269,9 +260,18 @@
269260
}],
270261
[ '(OS=="freebsd" or OS=="linux") and node_shared=="false"'
271262
' and force_load=="true"', {
272-
'ldflags': [ '-Wl,-z,noexecstack',
273-
'-Wl,--whole-archive <(v8_base)',
274-
'-Wl,--no-whole-archive' ]
263+
'ldflags': [
264+
'-Wl,-z,noexecstack',
265+
'-Wl,--whole-archive <(v8_base)',
266+
'-Wl,--no-whole-archive',
267+
]
268+
}],
269+
[ 'node_use_bundled_v8=="true" and v8_postmortem_support==1 and force_load=="true"', {
270+
'xcode_settings': {
271+
'OTHER_LDFLAGS': [
272+
'-Wl,-force_load,<(v8_base)',
273+
],
274+
},
275275
}],
276276
[ 'coverage=="true" and node_shared=="false" and OS in "mac freebsd linux"', {
277277
'cflags!': [ '-O3' ],

tools/msvs/pch/v8_pch.h

Lines changed: 16 additions & 0 deletions

0 commit comments

Comments
 (0)