Skip to content

Commit cc75ba3

Browse files
ryzokukenrefack
authored andcommitted
deps: sync V8 gypfiles with 7.4
Normalized boolean options in the gypfiles for consistency both internally and with the V8 GN config. Co-authored-by: Michaël Zasso <[email protected]> PR-URL: #26685 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 7df9e77 commit cc75ba3

11 files changed

+277
-126
lines changed

common.gypi

+4-13
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
##### V8 defaults for Node.js #####
4343

4444
# Old time default, now explicitly stated.
45-
'v8_use_snapshot': 'true',
45+
'v8_use_snapshot': 1,
4646

4747
# Turn on SipHash for hash seed generation, addresses HashWick
4848
'v8_use_siphash': 'true',
@@ -58,21 +58,12 @@
5858
# Enable disassembler for `--print-code` v8 options
5959
'v8_enable_disassembler': 1,
6060

61-
# Don't bake anything extra into the snapshot.
62-
'v8_use_external_startup_data': 0,
63-
6461
# https://github.com/nodejs/node/pull/22920/files#r222779926
6562
'v8_enable_handle_zapping': 0,
6663

6764
# Disable V8 untrusted code mitigations.
6865
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
69-
'v8_untrusted_code_mitigations': 'false',
70-
71-
# Still WIP in V8 7.1
72-
'v8_enable_pointer_compression': 'false',
73-
74-
# New in V8 7.1
75-
'v8_enable_embedded_builtins': 'true',
66+
'v8_untrusted_code_mitigations': 0,
7667

7768
# This is more of a V8 dev setting
7869
# https://github.com/nodejs/node/pull/22920/files#r222779926
@@ -102,12 +93,12 @@
10293
}],
10394
['OS == "win"', {
10495
'os_posix': 0,
105-
'v8_postmortem_support%': 'false',
96+
'v8_postmortem_support%': 0,
10697
'obj_dir': '<(PRODUCT_DIR)/obj',
10798
'v8_base': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
10899
}, {
109100
'os_posix': 1,
110-
'v8_postmortem_support%': 'true',
101+
'v8_postmortem_support%': 1,
111102
}],
112103
['OS == "mac"', {
113104
'obj_dir%': '<(PRODUCT_DIR)/obj.target',

configure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,8 @@ def configure_v8(o):
11241124
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
11251125
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
11261126
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
1127-
o['variables']['v8_use_snapshot'] = 'false' if options.without_snapshot else 'true'
1128-
o['variables']['v8_use_siphash'] = 'false' if options.without_siphash else 'true'
1127+
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
1128+
o['variables']['v8_use_snapshot'] = 0 if options.without_snapshot else 1
11291129
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
11301130
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
11311131
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)

deps/v8/gypfiles/d8.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}],
5454
[ 'component!="shared_library"', {
5555
'conditions': [
56-
[ 'v8_postmortem_support=="true"', {
56+
[ 'v8_postmortem_support==1', {
5757
'xcode_settings': {
5858
'OTHER_LDFLAGS': [
5959
'-Wl,-force_load,<(PRODUCT_DIR)/libv8_base.a'

deps/v8/gypfiles/features.gypi

+131-84
Original file line numberDiff line numberDiff line change
@@ -42,91 +42,121 @@
4242
}],
4343
],
4444

45-
# Allows the embedder to add a custom suffix to the version string.
46-
'v8_embedder_string%': '',
47-
48-
'v8_enable_disassembler%': 0,
49-
50-
'v8_promise_internal_field_count%': 0,
51-
52-
'v8_enable_gdbjit%': 0,
45+
# Variables from BUILD.gn
5346

54-
# Enable code-generation-time checking of types in the CodeStubAssembler.
55-
'v8_enable_verify_csa%': 0,
47+
# Set to 1 to enable DCHECKs in release builds.
48+
'dcheck_always_on%': 0,
5649

57-
'v8_object_print%': 0,
50+
# Sets -DV8_ENABLE_FUTURE.
51+
'v8_enable_future%': 0,
5852

5953
# Lite mode disables a number of performance optimizations to reduce memory
6054
# at the cost of performance.
6155
# Sets --DV8_LITE_MODE.
6256
'v8_enable_lite_mode%': 0,
6357

58+
# Sets -DVERIFY_HEAP.
6459
'v8_enable_verify_heap%': 0,
6560

66-
'v8_trace_maps%': 0,
61+
# Sets -DVERIFY_PREDICTABLE
62+
'v8_enable_verify_predictable%': 0,
6763

68-
# Enable the snapshot feature, for fast context creation.
69-
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
70-
'v8_use_snapshot%': 'true',
64+
# Enable compiler warnings when using V8_DEPRECATED apis.
65+
'v8_deprecation_warnings%': 0,
7166

72-
'v8_enable_verify_predictable%': 0,
67+
# Enable compiler warnings when using V8_DEPRECATE_SOON apis.
68+
'v8_imminent_deprecation_warnings%': 0,
7369

74-
# With post mortem support enabled, metadata is embedded into libv8 that
75-
# describes various parameters of the VM for use by debuggers. See
76-
# tools/gen-postmortem-metadata.py for details.
77-
'v8_postmortem_support%': 'false',
70+
# Allows the embedder to add a custom suffix to the version string.
71+
'v8_embedder_string%': '',
7872

79-
# Use Siphash as added protection against hash flooding attacks.
80-
'v8_use_siphash%': 'false',
73+
# Sets -dENABLE_DISASSEMBLER.
74+
'v8_enable_disassembler%': 0,
8175

82-
# Interpreted regexp engine exists as platform-independent alternative
83-
# based where the regular expression is compiled to a bytecode.
84-
'v8_interpreted_regexp%': 0,
76+
# Sets the number of internal fields on promise objects.
77+
'v8_promise_internal_field_count%': 0,
8578

86-
# Enable ECMAScript Internationalization API. Enabling this feature will
87-
# add a dependency on the ICU library.
88-
'v8_enable_i18n_support%': 1,
79+
# Sets -dENABLE_GDB_JIT_INTERFACE.
80+
'v8_enable_gdbjit%': 0,
8981

90-
# Enable compiler warnings when using V8_DEPRECATED apis.
91-
'v8_deprecation_warnings%': 0,
82+
# Sets -dENABLE_VTUNE_JIT_INTERFACE.
83+
'v8_enable_vtunejit%': 0,
9284

93-
# Enable compiler warnings when using V8_DEPRECATE_SOON apis.
94-
'v8_imminent_deprecation_warnings%': 0,
85+
# Currently set for node by common.gypi, avoiding default because of gyp file bug.
86+
# Should be turned on only for debugging.
87+
#'v8_enable_handle_zapping%': 0,
9588

96-
# Set to 1 to enable DCHECKs in release builds.
97-
'dcheck_always_on%': 0,
89+
# Enable fast mksnapshot runs.
90+
'v8_enable_fast_mksnapshot%': 0,
9891

99-
# Enable/disable JavaScript API accessors.
100-
'v8_js_accessors%': 0,
92+
# Enable embedded builtins.
93+
'v8_enable_embedded_builtins%': 1,
10194

102-
# Temporary flag to allow embedders to update their microtasks scopes.
103-
'v8_check_microtasks_scopes_consistency%': 'false',
95+
# Enable code comments for builtins in the snapshot (impacts performance).
96+
'v8_enable_snapshot_code_comments%': 0,
10497

105-
# Enable concurrent marking.
98+
# Enable code-generation-time checking of types in the CodeStubAssembler.
99+
'v8_enable_verify_csa%': 0,
100+
101+
# Enable pointer compression (sets -dV8_COMPRESS_POINTERS).
102+
'v8_enable_pointer_compression%': 0,
103+
'v8_enable_31bit_smis_on_64bit_arch%': 0,
104+
105+
# Sets -dOBJECT_PRINT.
106+
'v8_enable_object_print%': 0,
107+
108+
# Sets -dV8_TRACE_MAPS.
109+
'v8_enable_trace_maps%': 0,
110+
111+
# Sets -dV8_ENABLE_CHECKS.
112+
'v8_enable_v8_checks%': 0,
113+
114+
# Sets -dV8_TRACE_IGNITION.
115+
'v8_enable_trace_ignition%': 0,
116+
117+
# Sets -dV8_TRACE_FEEDBACK_UPDATES.
118+
'v8_enable_trace_feedback_updates%': 0,
119+
120+
# Sets -dV8_CONCURRENT_MARKING
106121
'v8_enable_concurrent_marking%': 1,
107122

108123
# Enables various testing features.
109124
'v8_enable_test_features%': 0,
110125

126+
# With post mortem support enabled, metadata is embedded into libv8 that
127+
# describes various parameters of the VM for use by debuggers. See
128+
# tools/gen-postmortem-metadata.py for details.
129+
'v8_postmortem_support%': 0,
130+
131+
# Use Siphash as added protection against hash flooding attacks.
132+
'v8_use_siphash%': 0,
133+
111134
# Controls the threshold for on-heap/off-heap Typed Arrays.
112135
'v8_typed_array_max_size_in_heap%': 64,
113136

137+
# Temporary flag to allow embedders to update their microtasks scopes
138+
# while rolling in a new version of V8.
139+
'v8_check_microtasks_scopes_consistency%': 0,
140+
114141
# Enable mitigations for executing untrusted code.
115-
'v8_untrusted_code_mitigations%': 'true',
142+
'v8_untrusted_code_mitigations%': 1,
116143

117-
# Currently set for node by common.gypi, avoiding default because of gyp file bug.
118-
# Should be turned on only for debugging.
119-
#'v8_enable_handle_zapping%': 0,
144+
# Enable minor mark compact.
145+
'v8_enable_minor_mc%': 1,
120146

121-
'v8_enable_pointer_compression%': 'false',
122-
'v8_enable_31bit_smis_on_64bit_arch%': 'false',
147+
# Variables from v8.gni
123148

124-
'v8_enable_embedded_builtins%': 'true',
149+
# Enable the snapshot feature, for fast context creation.
150+
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
151+
'v8_use_snapshot%': 1,
125152

126-
# Enable code comments for builtins in the snapshot (impacts performance).
127-
'v8_enable_snapshot_code_comments%': 'false',
153+
# Use external files for startup data blobs:
154+
# the JS builtins sources and the start snapshot.
155+
'v8_use_external_startup_data%': 0,
128156

129-
'v8_enable_fast_mksnapshot%': 0,
157+
# Enable ECMAScript Internationalization API. Enabling this feature will
158+
# add a dependency on the ICU library.
159+
'v8_enable_i18n_support%': 1,
130160
},
131161

132162
'target_defaults': {
@@ -140,37 +170,56 @@
140170
['v8_promise_internal_field_count!=0', {
141171
'defines': ['V8_PROMISE_INTERNAL_FIELD_COUNT=<(v8_promise_internal_field_count)'],
142172
}],
173+
['v8_enable_future==1', {
174+
'defines': ['V8_ENABLE_FUTURE',],
175+
}],
143176
['v8_enable_lite_mode==1', {
144177
'defines': [
145178
'V8_LITE_MODE',
146-
147-
# TODO(v8:7777): Remove the define once the --jitless runtime flag does everything we need.
148179
'V8_JITLESS_MODE',
149180
],
150181
}],
151182
['v8_enable_gdbjit==1', {
152183
'defines': ['ENABLE_GDB_JIT_INTERFACE',],
153184
}],
154-
['v8_enable_verify_csa==1', {
155-
'defines': ['ENABLE_VERIFY_CSA',],
185+
['v8_enable_vtunejit==1', {
186+
'defines': ['ENABLE_VTUNE_JIT_INTERFACE',],
156187
}],
157-
['v8_object_print==1', {
188+
['v8_enable_minor_mc==1', {
189+
'defines': ['ENABLE_MINOR_MC',],
190+
}],
191+
['v8_enable_pointer_compression==1', {
192+
'defines': ['V8_COMPRESS_POINTERS',],
193+
}],
194+
['v8_enable_pointer_compression==1 or v8_enable_31bit_smis_on_64bit_arch==1', {
195+
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH',],
196+
}],
197+
['v8_enable_object_print==1', {
158198
'defines': ['OBJECT_PRINT',],
159199
}],
160200
['v8_enable_verify_heap==1', {
161201
'defines': ['VERIFY_HEAP',],
162202
}],
163-
['v8_trace_maps==1', {
203+
['v8_enable_verify_predictable==1', {
204+
'defines': ['VERIFY_PREDICTABLE',],
205+
}],
206+
['v8_enable_trace_maps==1', {
164207
'defines': ['V8_TRACE_MAPS',],
165208
}],
166-
['v8_enable_test_features==1', {
167-
'defines': ['V8_ENABLE_ALLOCATION_TIMEOUT', 'V8_ENABLE_FORCE_SLOW_PATH'],
209+
['v8_enable_trace_ignition==1', {
210+
'defines': ['V8_TRACE_IGNITION',],
168211
}],
169-
['v8_enable_verify_predictable==1', {
170-
'defines': ['VERIFY_PREDICTABLE',],
212+
['v8_enable_trace_feedback_updates==1', {
213+
'defines': ['V8_TRACE_FEEDBACK_UPDATES',],
214+
}],
215+
['v8_enable_test_features==1', {
216+
'defines': [
217+
'V8_ENABLE_ALLOCATION_TIMEOUT',
218+
'V8_ENABLE_FORCE_SLOW_PATH',
219+
],
171220
}],
172-
['v8_interpreted_regexp==1 or v8_enable_lite_mode==1', {
173-
'defines': ['V8_INTERPRETED_REGEXP',],
221+
['v8_enable_v8_checks==1', {
222+
'defines': ['V8_ENABLE_CHECKS',],
174223
}],
175224
['v8_deprecation_warnings==1', {
176225
'defines': ['V8_DEPRECATION_WARNINGS',],
@@ -185,38 +234,36 @@
185234
['v8_enable_i18n_support==1', {
186235
'defines': ['V8_INTL_SUPPORT',],
187236
}],
188-
['v8_use_snapshot=="true" and v8_use_external_startup_data==1', {
189-
'defines': ['V8_USE_EXTERNAL_STARTUP_DATA',],
237+
# Refs: https://github.com/nodejs/node/pull/23801
238+
# ['v8_enable_handle_zapping==1', {
239+
# 'defines': ['ENABLE_HANDLE_ZAPPING',],
240+
# }],
241+
['v8_use_snapshot==1', {
242+
'defines': ['V8_USE_SNAPSHOT',],
190243
}],
191-
['v8_use_siphash=="true"', {
192-
'defines': ['V8_USE_SIPHASH',],
244+
['v8_use_external_startup_data==1', {
245+
'defines': ['V8_USE_EXTERNAL_STARTUP_DATA',],
193246
}],
194-
['dcheck_always_on!=0', {
195-
'defines': ['DEBUG',],
247+
['v8_enable_concurrent_marking==1', {
248+
'defines': ['V8_CONCURRENT_MARKING',],
196249
}],
197-
['v8_check_microtasks_scopes_consistency=="true"', {
250+
['v8_check_microtasks_scopes_consistency==1', {
198251
'defines': ['V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY',],
199252
}],
200-
['v8_enable_concurrent_marking==1', {
201-
'defines': ['V8_CONCURRENT_MARKING',],
253+
['v8_enable_embedded_builtins==1', {
254+
'defines': ['V8_EMBEDDED_BUILTINS',],
202255
}],
203-
['v8_untrusted_code_mitigations=="false"', {
204-
'defines': ['DISABLE_UNTRUSTED_CODE_MITIGATIONS',],
256+
['v8_use_siphash==1', {
257+
'defines': ['V8_USE_SIPHASH',],
205258
}],
206-
# Refs: https://github.com/nodejs/node/pull/23801
207-
# ['v8_enable_handle_zapping==1', {
208-
# 'defines': ['ENABLE_HANDLE_ZAPPING',],
209-
# }],
210-
['v8_enable_pointer_compression=="true"', {
211-
'defines': ['V8_COMPRESS_POINTERS',],
259+
['dcheck_always_on!=0', {
260+
'defines': ['DEBUG',],
212261
}],
213-
['v8_enable_31bit_smis_on_64bit_arch=="true"', {
214-
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH',],
262+
['v8_enable_verify_csa==1', {
263+
'defines': ['ENABLE_VERIFY_CSA',],
215264
}],
216-
['v8_enable_embedded_builtins=="true"', {
217-
'defines': [
218-
'V8_EMBEDDED_BUILTINS',
219-
],
265+
['v8_untrusted_code_mitigations==0', {
266+
'defines': ['DISABLE_UNTRUSTED_CODE_MITIGATIONS',],
220267
}],
221268
], # conditions
222269
'defines': [

deps/v8/gypfiles/standalone.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'v8_enable_i18n_support%': 1,
4444
'v8_deprecation_warnings': 1,
4545
'v8_imminent_deprecation_warnings': 1,
46-
'v8_check_microtasks_scopes_consistency': 'true',
46+
'v8_check_microtasks_scopes_consistency': 1,
4747
'msvs_multi_core_compile%': '1',
4848
'mac_deployment_target%': '10.7',
4949
'release_extra_cflags%': '',

0 commit comments

Comments
 (0)