From 62ef1eb4ff4a8c9edd0cf56d3b1905734ad9b31b Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Thu, 17 Nov 2022 09:28:48 +0900 Subject: [PATCH] build: add --v8-disable-object-print flag --v8-enable-object-print flag is set by default true. so, no way of disable this flag. add a --v8-disable-object-print flag instead that defaults to false. Fixes: https://github.com/nodejs/node/issues/45433 PR-URL: https://github.com/nodejs/node/pull/45458 Reviewed-By: Joyee Cheung Reviewed-By: Richard Lau --- configure.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index c693edc9284dbd..d706c4bc0d22a5 100755 --- a/configure.py +++ b/configure.py @@ -776,7 +776,13 @@ action='store_true', dest='v8_enable_object_print', default=True, - help='compile V8 with auxiliar functions for native debuggers') + help='compile V8 with auxiliary functions for native debuggers') + +parser.add_argument('--v8-disable-object-print', + action='store_true', + dest='v8_disable_object_print', + default=False, + help='disable the V8 auxiliary functions for native debuggers') parser.add_argument('--v8-enable-hugepage', action='store_true', @@ -1437,7 +1443,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_enable_object_print'] = 0 if options.v8_disable_object_print else 1 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 @@ -1460,6 +1466,10 @@ def configure_v8(o): o['variables']['v8_enable_hugepage'] = 1 if options.v8_enable_hugepage else 0 if options.v8_enable_short_builtin_calls or o['variables']['target_arch'] == 'x64': o['variables']['v8_enable_short_builtin_calls'] = 1 + if options.v8_enable_object_print and options.v8_disable_object_print: + raise Exception( + 'Only one of the --v8-enable-object-print or --v8-disable-object-print options ' + 'can be specified at a time.') def configure_openssl(o): variables = o['variables']