Skip to content

Commit 69581b2

Browse files
committed
build: don't compile debug build with -Og
It's not supported by clang and commit e67542a ("build: disable -Og when building with clang") is not sufficient because the configure script no longer writes the 'clang' variable to common.gypi. I could fix the configure script but I don't care enough actually do so. A fixed configure script won't help anyway when the compiler is overridden through the CXX environment variable at compile time. PR-URL: #1611 Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent ca219b0 commit 69581b2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

common.gypi

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'node_tag%': '',
1515
'uv_library%': 'static_library',
1616

17-
# Default to -Og for debug builds.
17+
# Default to -O0 for debug builds.
1818
'v8_optimized_debug%': 0,
1919

2020
# Enable disassembler for `--print-code` v8 options
@@ -54,13 +54,8 @@
5454
'v8_enable_handle_zapping%': 1,
5555
},
5656
'defines': [ 'DEBUG', '_DEBUG' ],
57-
'cflags': [ '-g' ],
57+
'cflags': [ '-g', '-O0' ],
5858
'conditions': [
59-
['clang==1', {
60-
'cflags': [ '-O0' ], # https://llvm.org/bugs/show_bug.cgi?id=20765
61-
}, {
62-
'cflags': [ '-Og' ], # Debug-friendly optimizations only.
63-
}],
6459
['target_arch=="x64"', {
6560
'msvs_configuration_platform': 'x64',
6661
}],

0 commit comments

Comments
 (0)