Use -Og when building in debug mode

This commit is contained in:
Kovid Goyal
2017-11-08 16:13:21 +05:30
parent 802524a17a
commit c1a1b06fe7
4 changed files with 10 additions and 7 deletions

View File

@@ -130,7 +130,10 @@ def init_env(
missing_braces = ''
if ccver < (5, 2) and cc == 'gcc':
missing_braces = '-Wno-missing-braces'
optimize = '-g3' if debug or sanitize else '-O3'
df = '-g3'
if ccver >= (5, 0):
df += ' -Og'
optimize = df if debug or sanitize else '-O3'
sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set()
cflags = os.environ.get(
'OVERRIDE_CFLAGS', (