From 2abc98e9ff8f95f6a68b543e7df42acf16eb9377 Mon Sep 17 00:00:00 2001 From: Mary Marchini Date: Mon, 13 Apr 2020 17:50:55 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/issues/32402 Signed-off-by: Mary Marchini PR-URL: https://github.com/nodejs/node/pull/32834 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Ujjwal Sharma Reviewed-By: Jiawen Geng --- configure.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.py b/configure.py index 749692b9e2d69b..3aadac4055e1c0 100755 --- a/configure.py +++ b/configure.py @@ -659,6 +659,12 @@ 'memory footprint, but also implies no just-in-time compilation ' + 'support, thus much slower execution)') +parser.add_option('--v8-enable-object-print', + action='store_true', + dest='v8_enable_object_print', + default=False, + help='compile V8 with auxiliar functions for native debuggers') + parser.add_option('--node-builtin-modules-path', action='store', dest='node_builtin_modules_path', @@ -1266,6 +1272,7 @@ def configure_v8(o): 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_enable_object_print'] = 1 if options.v8_enable_object_print 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