Skip to content

Commit 5620727

Browse files
refacktargos
andcommitted
deps: sync V8 gypfiles with 7.1
Enable v8_enable_embedded_builtins. Reorder conditions proccessing for `run_mksnapshot`. deps,v8: link with `atomic` for platforms lacking CAS Fixes: nodejs/node-v8#81 Co-authored-by: Michaël Zasso <[email protected]> PR-URL: #23423 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent 2360344 commit 5620727

File tree

5 files changed

+340
-108
lines changed

5 files changed

+340
-108
lines changed

common.gypi

+34-7
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,53 @@
2929

3030
'openssl_fips%': '',
3131

32+
# Some STL containers (e.g. std::vector) do not preserve ABI compatibility
33+
# between debug and non-debug mode.
34+
'disable_glibcxx_debug': 1,
35+
36+
# Don't use ICU data file (icudtl.dat) from V8, we use our own.
37+
'icu_use_data_file_flag%': 0,
38+
3239
# Reset this number to 0 on major V8 upgrades.
3340
# Increment by one for each non-official patch applied to deps/v8.
34-
'v8_embedder_string': '-node.0',
41+
'v8_embedder_string': '-node.1',
42+
43+
##### V8 defaults for Node.js #####
44+
45+
# Old time default, now explicitly stated.
46+
'v8_use_snapshot': 'true',
47+
48+
# Refs: https://github.com/nodejs/node/issues/23122
49+
# Refs: https://github.com/nodejs/node/issues/23167
50+
# Enable compiler warnings when using V8_DEPRECATED apis.
51+
'v8_deprecation_warnings': 1,
52+
# Enable compiler warnings when using V8_DEPRECATE_SOON apis.
53+
'v8_imminent_deprecation_warnings': 1,
3554

3655
# Enable disassembler for `--print-code` v8 options
3756
'v8_enable_disassembler': 1,
3857

3958
# Don't bake anything extra into the snapshot.
40-
'v8_use_external_startup_data%': 0,
59+
'v8_use_external_startup_data': 0,
60+
61+
# https://github.com/nodejs/node/pull/22920/files#r222779926
62+
'v8_enable_handle_zapping': 0,
4163

4264
# Disable V8 untrusted code mitigations.
4365
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
4466
'v8_untrusted_code_mitigations': 'false',
4567

46-
# Some STL containers (e.g. std::vector) do not preserve ABI compatibility
47-
# between debug and non-debug mode.
48-
'disable_glibcxx_debug': 1,
68+
# Still WIP in V8 7.1
69+
'v8_enable_pointer_compression': 'false',
4970

50-
# Don't use ICU data file (icudtl.dat) from V8, we use our own.
51-
'icu_use_data_file_flag%': 0,
71+
# New in V8 7.1
72+
'v8_enable_embedded_builtins': 'true',
73+
74+
# This is more of a V8 dev setting
75+
# https://github.com/nodejs/node/pull/22920/files#r222779926
76+
'v8_enable_fast_mksnapshot': 0,
77+
78+
##### end V8 defaults #####
5279

5380
'conditions': [
5481
['target_arch=="arm64"', {

deps/v8/gypfiles/features.gypi

+29
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
'variables': {
3232
'v8_target_arch%': '<(target_arch)',
3333

34+
'v8_current_cpu%': '<(target_arch)',
35+
3436
# Emulate GN variables
3537
'conditions': [
3638
['OS=="android"', { # GYP reverts OS to linux so use `-D OS=android`
@@ -106,7 +108,25 @@
106108
# Currently set for node by common.gypi, avoiding default because of gyp file bug.
107109
# Should be turned on only for debugging.
108110
#'v8_enable_handle_zapping%': 0,
111+
112+
'v8_enable_pointer_compression%': 'false',
113+
114+
'v8_enable_embedded_builtins%': 'true',
115+
116+
'v8_perf_prof_unwinding_info%': 0,
117+
118+
'v8_enable_fast_mksnapshot%': 0,
109119
},
120+
121+
'conditions': [
122+
# V8's predicate inverted since we default to 'true' and set 'false' for unsupported cases.
123+
# v8_use_snapshot && v8_current_cpu != "x86" && !is_aix && ( !is_win || is_clang)
124+
['not (v8_use_snapshot=="true" and v8_target_arch !="ia32" and OS!="aix" and (OS!="win" or clang==1))', {
125+
'variables': {
126+
'v8_enable_embedded_builtins': 'false',
127+
}
128+
}],
129+
],
110130
'target_defaults': {
111131
'conditions': [
112132
['v8_embedder_string!=""', {
@@ -170,6 +190,15 @@
170190
# ['v8_enable_handle_zapping==1', {
171191
# 'defines': ['ENABLE_HANDLE_ZAPPING',],
172192
# }],
193+
['v8_enable_pointer_compression=="true"', {
194+
'defines': ['V8_COMPRESS_POINTERS',],
195+
}],
196+
['v8_enable_embedded_builtins=="true"', {
197+
'defines': [
198+
'V8_EMBEDDED_BUILTINS',
199+
'V8_EMBEDDED_BYTECODE_HANDLERS',
200+
],
201+
}],
173202
], # conditions
174203
'defines': [
175204
'V8_GYP_BUILD',

deps/v8/gypfiles/v8-monolithic.gyp

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
'v8_code': 1,
88
'v8_random_seed%': 314159265,
99
'v8_vector_stores%': 0,
10-
'embed_script%': "",
11-
'warmup_script%': "",
10+
'v8_embed_script%': "",
1211
'v8_extra_library_files%': [],
1312
'v8_experimental_extra_library_files%': [],
1413
'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',

0 commit comments

Comments
 (0)