Skip to content

Commit 40bc080

Browse files
committed
tools: update V8 gypfiles for 10.1
PR-URL: #42657 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 62e6275 commit 40bc080

File tree

5 files changed

+85
-28
lines changed

5 files changed

+85
-28
lines changed

configure.py

+1
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,7 @@ def configure_library(lib, output, pkgname=None):
14461446

14471447
def configure_v8(o):
14481448
o['variables']['v8_enable_webassembly'] = 1
1449+
o['variables']['v8_enable_javascript_promise_hooks'] = 1
14491450
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
14501451
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
14511452
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.

tools/v8_gypfiles/features.gypi

+52-16
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@
160160
# Enables various testing features.
161161
'v8_enable_test_features%': 0,
162162

163-
# Enables raw heap snapshots containing internals. Used for debugging memory
164-
# on platform and embedder level.
165-
'v8_enable_raw_heap_snapshots%': 0,
163+
# Enable the Maglev compiler.
164+
# Sets -dV8_ENABLE_MAGLEV
165+
'v8_enable_maglev%': 0,
166166

167167
# With post mortem support enabled, metadata is embedded into libv8 that
168168
# describes various parameters of the VM for use by debuggers. See
@@ -179,9 +179,6 @@
179179
# Controls the threshold for on-heap/off-heap Typed Arrays.
180180
'v8_typed_array_max_size_in_heap%': 64,
181181

182-
# Enable minor mark compact.
183-
'v8_enable_minor_mc%': 1,
184-
185182
# Enable lazy source positions by default.
186183
'v8_enable_lazy_source_positions%': 1,
187184

@@ -217,26 +214,50 @@
217214
# Sets -DV8_COMPRESS_ZONES.
218215
'v8_enable_zone_compression%': 0,
219216

217+
# Enable the experimental V8 sandbox.
218+
# Sets -DV8_SANDBOX.
219+
'v8_enable_sandbox%': 0,
220+
221+
# Enable external pointer sandboxing. Requires v8_enable_sandbox.
222+
# Sets -DV8_SANDBOXED_EXTERNAL_POINRTERS.
223+
'v8_enable_sandboxed_external_pointers%': 0,
224+
225+
# Enable sandboxed pointers. Requires v8_enable_sandbox.
226+
# Sets -DV8_SANDBOXED_POINTERS.
227+
'v8_enable_sandboxed_pointers%': 0,
228+
220229
# Experimental feature for collecting per-class zone memory stats.
221230
# Requires use_rtti = true
222231
'v8_enable_precise_zone_stats%': 0,
223232

233+
# Experimental feature that uses SwissNameDictionary instead of NameDictionary
234+
# as the backing store for all dictionary mode objects.
235+
'v8_enable_swiss_name_dictionary%': 0,
236+
224237
# Experimental feature for tracking constness of properties in non-global
225238
# dictionaries. Enabling this also always keeps prototypes in dict mode,
226239
# meaning that they are not switched to fast mode.
227240
# Sets -DV8_DICT_PROPERTY_CONST_TRACKING
228241
'v8_dict_property_const_tracking%': 0,
229242

243+
# Allow for JS promise hooks (instead of just C++).
244+
'v8_enable_javascript_promise_hooks%': 0,
245+
230246
# Enable allocation folding globally (sets -dV8_ALLOCATION_FOLDING).
231247
# When it's disabled, the --turbo-allocation-folding runtime flag will be ignored.
232248
'v8_enable_allocation_folding%': 1,
233249

250+
# Enable runtime verification of heap snapshots produced for devtools.
251+
'v8_enable_heap_snapshot_verify%': 0,
252+
234253
# Enable global allocation site tracking.
235254
'v8_allocation_site_tracking%': 1,
236255

237256
'v8_scriptormodule_legacy_lifetime%': 1,
238257

239-
'v8_include_receiver_in_argc%': 1,
258+
# Change code emission and runtime features to be CET shadow-stack compliant
259+
# (incomplete and experimental).
260+
'v8_enable_cet_shadow_stack%': 0,
240261

241262
# Variables from v8.gni
242263

@@ -270,9 +291,6 @@
270291
['v8_promise_internal_field_count!=0', {
271292
'defines': ['V8_PROMISE_INTERNAL_FIELD_COUNT=<(v8_promise_internal_field_count)'],
272293
}],
273-
['v8_enable_raw_heap_snapshots==1', {
274-
'defines': ['V8_ENABLE_RAW_HEAP_SNAPSHOTS',],
275-
}],
276294
['v8_enable_future==1', {
277295
'defines': ['V8_ENABLE_FUTURE',],
278296
}],
@@ -285,9 +303,6 @@
285303
['v8_enable_hugepage==1', {
286304
'defines': ['ENABLE_HUGEPAGE',],
287305
}],
288-
['v8_enable_minor_mc==1', {
289-
'defines': ['ENABLE_MINOR_MC',],
290-
}],
291306
['v8_enable_pointer_compression==1', {
292307
'defines': [
293308
'V8_COMPRESS_POINTERS',
@@ -303,6 +318,15 @@
303318
['v8_enable_zone_compression==1', {
304319
'defines': ['V8_COMPRESS_ZONES',],
305320
}],
321+
['v8_enable_sandbox==1', {
322+
'defines': ['V8_SANDBOX',],
323+
}],
324+
['v8_enable_sandboxed_pointers==1', {
325+
'defines': ['V8_SANDBOXED_POINTERS',],
326+
}],
327+
['v8_enable_sandboxed_external_pointers==1', {
328+
'defines': ['V8_SANDBOXED_EXTERNAL_POINTERS',],
329+
}],
306330
['v8_enable_object_print==1', {
307331
'defines': ['OBJECT_PRINT',],
308332
}],
@@ -348,6 +372,9 @@
348372
# ['v8_enable_handle_zapping==1', {
349373
# 'defines': ['ENABLE_HANDLE_ZAPPING',],
350374
# }],
375+
['v8_enable_heap_snapshot_verify==1', {
376+
'defines': ['V8_ENABLE_HEAP_SNAPSHOT_VERIFY',],
377+
}],
351378
['v8_enable_snapshot_native_code_counters==1', {
352379
'defines': ['V8_SNAPSHOT_NATIVE_CODE_COUNTERS',],
353380
}],
@@ -390,9 +417,18 @@
390417
['v8_control_flow_integrity==1', {
391418
'defines': ['V8_ENABLE_CONTROL_FLOW_INTEGRITY',],
392419
}],
420+
['v8_enable_cet_shadow_stack==1', {
421+
'defines': ['V8_ENABLE_CET_SHADOW_STACK',],
422+
}],
393423
['v8_enable_precise_zone_stats==1', {
394424
'defines': ['V8_ENABLE_PRECISE_ZONE_STATS',],
395425
}],
426+
['v8_enable_maglev==1', {
427+
'defines': ['V8_ENABLE_MAGLEV',],
428+
}],
429+
['v8_enable_swiss_name_dictionary==1', {
430+
'defines': ['V8_ENABLE_SWISS_NAME_DICTIONARY',],
431+
}],
396432
['v8_enable_system_instrumentation==1', {
397433
'defines': ['V8_ENABLE_SYSTEM_INSTRUMENTATION',],
398434
}],
@@ -402,6 +438,9 @@
402438
['v8_dict_property_const_tracking==1', {
403439
'defines': ['V8_DICT_PROPERTY_CONST_TRACKING',],
404440
}],
441+
['v8_enable_javascript_promise_hooks==1', {
442+
'defines': ['V8_ENABLE_JAVASCRIPT_PROMISE_HOOKS',],
443+
}],
405444
['v8_enable_allocation_folding==1', {
406445
'defines': ['V8_ALLOCATION_FOLDING',],
407446
}],
@@ -414,9 +453,6 @@
414453
['v8_advanced_bigint_algorithms==1', {
415454
'defines': ['V8_ADVANCED_BIGINT_ALGORITHMS',],
416455
}],
417-
['v8_include_receiver_in_argc==1', {
418-
'defines': ['V8_INCLUDE_RECEIVER_IN_ARGC',],
419-
}],
420456
], # conditions
421457
'defines': [
422458
'V8_GYP_BUILD',

tools/v8_gypfiles/inspector.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
'<(inspector_protocol_path)/crdtp/protocol_core.h',
121121
'<(inspector_protocol_path)/crdtp/serializable.cc',
122122
'<(inspector_protocol_path)/crdtp/serializable.h',
123-
'<(inspector_protocol_path)/crdtp/serializer_traits.h',
124123
'<(inspector_protocol_path)/crdtp/span.cc',
125124
'<(inspector_protocol_path)/crdtp/span.h',
126125
'<(inspector_protocol_path)/crdtp/status.cc',
@@ -166,6 +165,7 @@
166165
'--jinja_dir', '<(V8_ROOT)/third_party',
167166
'--output_base', '<(inspector_generated_output_root)/src/inspector',
168167
'--config', '<(inspector_path)/inspector_protocol_config.json',
168+
'--config_value', 'protocol.path=<(v8_inspector_js_protocol)',
169169
'--inspector_protocol_dir', '<(inspector_protocol_path)',
170170
],
171171
'message': 'Generating inspector protocol sources from protocol json',

tools/v8_gypfiles/toolchain.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@
10081008
['OS=="mac"', {
10091009
'defines': [
10101010
'V8_HAVE_TARGET_OS',
1011-
'V8_TARGET_OS_MACOSX',
1011+
'V8_TARGET_OS_MACOS',
10121012
]
10131013
}],
10141014
['OS=="win"', {

tools/v8_gypfiles/v8.gyp

+30-10
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@
477477
'toolsets': ['host', 'target'],
478478
'dependencies': [
479479
'v8_config_headers',
480-
'cppgc_headers',
480+
'v8_heap_base_headers',
481481
'v8_version',
482482
],
483483
'direct_dependent_settings': {
@@ -529,7 +529,7 @@
529529
'v8_headers',
530530
'v8_maybe_icu',
531531
'v8_shared_internal_headers',
532-
'cppgc_headers',
532+
'v8_heap_base_headers',
533533
'generate_bytecode_builtins_list',
534534
'run_torque',
535535
'v8_libbase',
@@ -539,6 +539,11 @@
539539
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?sources = ")',
540540
],
541541
'conditions': [
542+
['v8_enable_maglev==1', {
543+
'sources': [
544+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_maglev.*?sources \\+= ")',
545+
],
546+
}],
542547
['v8_enable_webassembly==1', {
543548
'sources': [
544549
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_webassembly.*?sources \\+= ")',
@@ -554,6 +559,11 @@
554559
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?!v8_control_flow_integrity.*?sources \\+= ")',
555560
],
556561
}],
562+
['v8_enable_heap_snapshot_verify==1', {
563+
'sources': [
564+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_heap_snapshot_verify.*?sources \\+= ")',
565+
],
566+
}],
557567
['v8_target_arch=="ia32"', {
558568
'sources': [
559569
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"x86\\".*?sources \\+= ")',
@@ -745,8 +755,8 @@
745755
'dependencies': [
746756
'torque_generated_definitions',
747757
'v8_bigint',
748-
'v8_cppgc_shared',
749758
'v8_headers',
759+
'v8_heap_base',
750760
'v8_libbase',
751761
'v8_shared_internal_headers',
752762
'v8_version',
@@ -779,11 +789,21 @@
779789
'<(V8_ROOT)/src/heap/third-party/heap-api-stub.cc',
780790
],
781791
}],
792+
['v8_enable_maglev==1', {
793+
'sources': [
794+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_maglev.*?sources \\+= ")',
795+
],
796+
}],
782797
['v8_enable_webassembly==1', {
783798
'sources': [
784799
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_webassembly.*?sources \\+= ")',
785800
],
786801
}],
802+
['v8_enable_heap_snapshot_verify==1', {
803+
'sources': [
804+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_heap_snapshot_verify.*?sources \\+= ")',
805+
],
806+
}],
787807
['v8_target_arch=="ia32"', {
788808
'sources': [
789809
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x86.*?sources \\+= ")',
@@ -1128,6 +1148,7 @@
11281148
['OS == "mac" or OS == "ios"', {
11291149
'sources': [
11301150
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
1151+
'<(V8_ROOT)/src/base/platform/platform-darwin.cc',
11311152
'<(V8_ROOT)/src/base/platform/platform-macos.cc',
11321153
]
11331154
}],
@@ -1525,15 +1546,15 @@
15251546
],
15261547
}, # run_gen-regexp-special-case
15271548
{
1528-
'target_name': 'cppgc_headers',
1549+
'target_name': 'v8_heap_base_headers',
15291550
'type': 'none',
15301551
'toolsets': ['host', 'target'],
15311552
'direct_dependent_settings': {
15321553
'sources': [
1533-
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"cppgc_headers.*?sources = ")',
1554+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_source_set.\\"v8_heap_base_headers.*?sources = ")',
15341555
],
15351556
},
1536-
}, # cppgc_headers
1557+
}, # v8_heap_base_headers
15371558
{
15381559
'target_name': 'cppgc_base',
15391560
'type': 'none',
@@ -1562,15 +1583,14 @@
15621583
},
15631584
}, # v8_bigint
15641585
{
1565-
'target_name': 'v8_cppgc_shared',
1586+
'target_name': 'v8_heap_base',
15661587
'type': 'none',
15671588
'toolsets': ['host', 'target'],
15681589
'direct_dependent_settings': {
15691590
'sources': [
1591+
'<(V8_ROOT)/src/heap/base/active-system-pages.cc',
15701592
'<(V8_ROOT)/src/heap/base/stack.cc',
1571-
'<(V8_ROOT)/src/heap/base/stack.h',
15721593
'<(V8_ROOT)/src/heap/base/worklist.cc',
1573-
'<(V8_ROOT)/src/heap/base/worklist.h',
15741594
],
15751595
'conditions': [
15761596
['enable_lto=="true"', {
@@ -1651,7 +1671,7 @@
16511671
}],
16521672
],
16531673
},
1654-
}, # v8_cppgc_shared
1674+
}, # v8_heap_base
16551675

16561676
###############################################################################
16571677
# Public targets

0 commit comments

Comments
 (0)