Skip to content

Commit c0805f0

Browse files
addaleaxtargos
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 <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent 873d4aa commit c0805f0

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
@@ -629,6 +629,12 @@
629629
default=False,
630630
help='compile V8 with minimal optimizations and with runtime checks')
631631

632+
parser.add_option('--v8-with-dchecks',
633+
action='store_true',
634+
dest='v8_with_dchecks',
635+
default=False,
636+
help='compile V8 with debug checks and runtime debugging features enabled')
637+
632638
parser.add_option('--node-builtin-modules-path',
633639
action='store',
634640
dest='node_builtin_modules_path',
@@ -1228,6 +1234,7 @@ def configure_v8(o):
12281234
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
12291235
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
12301236
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
1237+
o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0
12311238
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
12321239
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
12331240
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1

0 commit comments

Comments
 (0)