Skip to content

Commit

Permalink
build: add configure flag to build V8 with DCHECKs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
addaleax authored and BethGriggs committed Apr 14, 2020
1 parent 3c8dd6d commit c0f43bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,12 @@
default=False,
help='compile V8 with minimal optimizations and with runtime checks')

parser.add_option('--v8-with-dchecks',
action='store_true',
dest='v8_with_dchecks',
default=False,
help='compile V8 with debug checks and runtime debugging features enabled')

parser.add_option('--node-builtin-modules-path',
action='store',
dest='node_builtin_modules_path',
Expand Down Expand Up @@ -1235,6 +1241,7 @@ def configure_v8(o):
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
Expand Down

0 comments on commit c0f43bf

Please sign in to comment.