diff --git a/configure.py b/configure.py index 77c87f5a953..e80d68fe874 100755 --- a/configure.py +++ b/configure.py @@ -107,6 +107,12 @@ parser.add_argument('--debug-node', default=None, help='build the Node.js part of the binary with debugging symbols') +parser.add_argument('--debug-symbols', + action='store_true', + dest='debug_symbols', + default=None, + help='add debugging symbols to release builds (adds -g without enabling DCHECKs)') + parser.add_argument('--dest-cpu', action='store', dest='dest_cpu', @@ -1457,6 +1463,9 @@ def configure_node(o): o['variables']['control_flow_guard'] = b(options.enable_cfg) o['variables']['node_use_amaro'] = b(not options.without_amaro) o['variables']['debug_node'] = b(options.debug_node) + o['variables']['debug_symbols'] = b(options.debug_symbols) + if options.debug_symbols: + o['cflags'] += ['-g'] o['default_configuration'] = 'Debug' if options.debug else 'Release' if options.error_on_warn and options.suppress_all_error_on_warn: raise Exception('--error_on_warn is incompatible with --suppress_all_error_on_warn.')