Skip to content

Commit dd0c522

Browse files
committed
build: add flag to build V8 with OBJECT_PRINT
Add a configure flag to build V8 with `-DOBJECT_PRINT`, which will expose auxiliar functions to inspect heap objects using native debuggers. Fixes: #32402 Signed-off-by: Mary Marchini <[email protected]> PR-URL: #32834 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent 3ddf2c9 commit dd0c522

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

configure.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,12 @@
706706
'memory footprint, but also implies no just-in-time compilation ' +
707707
'support, thus much slower execution)')
708708

709+
parser.add_option('--v8-enable-object-print',
710+
action='store_true',
711+
dest='v8_enable_object_print',
712+
default=False,
713+
help='compile V8 with auxiliar functions for native debuggers')
714+
709715
parser.add_option('--node-builtin-modules-path',
710716
action='store',
711717
dest='node_builtin_modules_path',
@@ -1321,6 +1327,7 @@ def configure_v8(o):
13211327
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
13221328
o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
13231329
o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0
1330+
o['variables']['v8_enable_object_print'] = 1 if options.v8_enable_object_print else 0
13241331
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
13251332
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
13261333
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1

0 commit comments

Comments
 (0)