Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5f8ecf3

Browse filesBrowse files
joyeecheungaduh95
authored andcommitted
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: #61100 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent e5558b0 commit 5f8ecf3
Copy full SHA for 5f8ecf3

1 file changed

+9Lines changed: 9 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@
105105
default=None,
106106
help='build the Node.js part of the binary with debugging symbols')
107107

108+
parser.add_argument('--debug-symbols',
109+
action='store_true',
110+
dest='debug_symbols',
111+
default=None,
112+
help='add debugging symbols to release builds (adds -g without enabling DCHECKs)')
113+
108114
parser.add_argument('--dest-cpu',
109115
action='store',
110116
dest='dest_cpu',
@@ -1549,6 +1555,9 @@ def configure_node(o):
15491555
o['variables']['control_flow_guard'] = b(options.enable_cfg)
15501556
o['variables']['node_use_amaro'] = b(not options.without_amaro)
15511557
o['variables']['debug_node'] = b(options.debug_node)
1558+
o['variables']['debug_symbols'] = b(options.debug_symbols)
1559+
if options.debug_symbols:
1560+
o['cflags'] += ['-g']
15521561
o['default_configuration'] = 'Debug' if options.debug else 'Release'
15531562
if options.error_on_warn and options.suppress_all_error_on_warn:
15541563
raise Exception('--error_on_warn is incompatible with --suppress_all_error_on_warn.')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.