Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,20 @@
help='Enable V8 transparent hugepage support. This feature is only '+
'available on Linux platform.')

parser.add_argument('--v8-enable-wasm-gdb-remote-debugging',
action='store_true',
dest='v8_enable_wasm_gdb_remote_debugging',
default=None,
help='Enable V8 WebAssembly debugging via the GDB-remote protocol. ' +
'Enabled by default on Linux, macOS, and Windows when WebAssembly ' +
'is enabled.')

parser.add_argument('--v8-disable-wasm-gdb-remote-debugging',
action='store_false',
dest='v8_enable_wasm_gdb_remote_debugging',
default=None,
help='Disable V8 WebAssembly debugging via the GDB-remote protocol.')

maglev_enabled_by_default_help = f"(Maglev is enabled by default on {','.join(maglev_enabled_architectures)})"

parser.add_argument('--v8-disable-maglev',
Expand Down Expand Up @@ -2179,6 +2193,18 @@ def configure_v8(o, configs):
set_configuration_variable(configs, 'v8_enable_v8_checks', release=0, debug=1)

o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1
if all(opt in sys.argv for opt in [
'--v8-enable-wasm-gdb-remote-debugging',
'--v8-disable-wasm-gdb-remote-debugging',
]):
raise Exception(
'Only one of the --v8-enable-wasm-gdb-remote-debugging or '
'--v8-disable-wasm-gdb-remote-debugging options can be specified at a time.')
wasm_gdb = options.v8_enable_wasm_gdb_remote_debugging
if wasm_gdb is None:
wasm_gdb = (o['variables']['v8_enable_webassembly'] and
flavor in ('linux', 'mac', 'win'))
o['variables']['v8_enable_wasm_gdb_remote_debugging'] = B(wasm_gdb)
o['variables']['v8_enable_javascript_promise_hooks'] = 1
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
is_gdbjit_supported_arch = (
Expand Down
7 changes: 7 additions & 0 deletions tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@
# Sets -dV8_ENABLE_WEBASSEMBLY.
'v8_enable_webassembly%': 1,

# Enable WebAssembly debugging via GDB-remote protocol.
# Sets -dV8_ENABLE_WASM_GDB_REMOTE_DEBUGGING.
'v8_enable_wasm_gdb_remote_debugging%': 0,

# Enable advanced BigInt algorithms, costing about 10-30 KiB binary size
# depending on platform.
'v8_advanced_bigint_algorithms%': 1,
Expand Down Expand Up @@ -524,6 +528,9 @@
['v8_enable_webassembly==1', {
'defines': ['V8_ENABLE_WEBASSEMBLY',],
}],
['v8_enable_wasm_gdb_remote_debugging==1', {
'defines': ['V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING',],
}],
['v8_dict_property_const_tracking==1', {
'defines': ['V8_DICT_PROPERTY_CONST_TRACKING',],
}],
Expand Down
10 changes: 10 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,11 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_webassembly.*?sources \\+= ")',
],
}],
['v8_enable_wasm_gdb_remote_debugging==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_wasm_gdb_remote_debugging.*?sources \\+= ")',
],
}],
['v8_enable_wasm_simd256_revec==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_wasm_simd256_revec.*?sources \\+= ")',
Expand Down Expand Up @@ -1193,6 +1198,11 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_webassembly.*?sources \\+= ")',
],
}],
['v8_enable_wasm_gdb_remote_debugging==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_wasm_gdb_remote_debugging.*?sources \\+= ")',
],
}],
['v8_enable_heap_snapshot_verify==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_heap_snapshot_verify.*?sources \\+= ")',
Expand Down
Loading