mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
build: add --debug-symbols to build with -g without enabling DCHECKs
This is useful when debugging release builds on Linux without enabling DCHECKs. PR-URL: https://github.com/nodejs/node/pull/61100 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
@@ -107,6 +107,12 @@ parser.add_argument('--debug-node',
|
|||||||
default=None,
|
default=None,
|
||||||
help='build the Node.js part of the binary with debugging symbols')
|
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',
|
parser.add_argument('--dest-cpu',
|
||||||
action='store',
|
action='store',
|
||||||
dest='dest_cpu',
|
dest='dest_cpu',
|
||||||
@@ -1560,6 +1566,9 @@ def configure_node(o):
|
|||||||
o['variables']['control_flow_guard'] = b(options.enable_cfg)
|
o['variables']['control_flow_guard'] = b(options.enable_cfg)
|
||||||
o['variables']['node_use_amaro'] = b(not options.without_amaro)
|
o['variables']['node_use_amaro'] = b(not options.without_amaro)
|
||||||
o['variables']['debug_node'] = b(options.debug_node)
|
o['variables']['debug_node'] = b(options.debug_node)
|
||||||
|
o['variables']['debug_symbols'] = b(options.debug_symbols)
|
||||||
|
if options.debug_symbols:
|
||||||
|
o['cflags'] += ['-g']
|
||||||
o['variables']['build_type%'] = 'Debug' if options.debug else 'Release'
|
o['variables']['build_type%'] = 'Debug' if options.debug else 'Release'
|
||||||
o['default_configuration'] = 'Debug' if options.debug else 'Release'
|
o['default_configuration'] = 'Debug' if options.debug else 'Release'
|
||||||
if options.error_on_warn and options.suppress_all_error_on_warn:
|
if options.error_on_warn and options.suppress_all_error_on_warn:
|
||||||
|
|||||||
Reference in New Issue
Block a user