Skip to content

Commit e0220f0

Browse files
joyeecheungaduh95
authored andcommitted
build: build with v8 gdbjit support on supported platform
Build it with gdbjit support on supported platforms by default allows debugging JIT-compiled code in gdb when it's also enabled at run time (via --gdbjit). Simply building it in should not incur an overhead if it's not also enabled at run time. PR-URL: #61010 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent bc38db5 commit e0220f0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

configure.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,16 @@ def configure_v8(o, configs):
18141814
o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1
18151815
o['variables']['v8_enable_javascript_promise_hooks'] = 1
18161816
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
1817-
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
1817+
is_gdbjit_supported_arch = (
1818+
'x64' in o['variables']['target_arch'] or
1819+
'ia32' in o['variables']['target_arch'] or
1820+
'ppc64' in o['variables']['target_arch']
1821+
)
1822+
is_linux = flavor == 'linux'
1823+
if (options.gdb is not None):
1824+
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
1825+
else:
1826+
o['variables']['v8_enable_gdbjit'] = 1 if is_gdbjit_supported_arch and is_linux else 0
18181827
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
18191828
o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0
18201829
o['variables']['v8_enable_object_print'] = 0 if options.v8_disable_object_print else 1

0 commit comments

Comments
 (0)