Skip to content

Commit e1809c8

Browse files
addaleaxBridgeAR
authored andcommitted
build: add configure flag to build V8 with DCHECKs
Add a configure flag that enables building V8 with `-DDEBUG`, in particular with debug checks enabled and with runtime debugging features, e.g. inspecting JS objects from debuggers, enabled. PR-URL: #32787 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent ae034c4 commit e1809c8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

configure.py

+7
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,12 @@
635635
default=False,
636636
help='compile V8 with minimal optimizations and with runtime checks')
637637

638+
parser.add_option('--v8-with-dchecks',
639+
action='store_true',
640+
dest='v8_with_dchecks',
641+
default=False,
642+
help='compile V8 with debug checks and runtime debugging features enabled')
643+
638644
parser.add_option('--node-builtin-modules-path',
639645
action='store',
640646
dest='node_builtin_modules_path',
@@ -1235,6 +1241,7 @@ def configure_v8(o):
12351241
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
12361242
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
12371243
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
1244+
o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0
12381245
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
12391246
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
12401247
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1

0 commit comments

Comments
 (0)