Correct the DEBUG define

This commit is contained in:
Kovid Goyal 2017-05-24 07:47:11 +05:30
parent b3a718b1e4
commit a79bb3add2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -115,9 +115,9 @@ def init_env(debug=False, sanitize=False, native_optimizations=True):
cflags = os.environ.get(
'OVERRIDE_CFLAGS', (
'-Wextra -Wno-missing-field-initializers -Wall -std=c99 -D_XOPEN_SOURCE=700'
' -pedantic-errors -Werror {} {} -DNDEBUG -fwrapv {} {} -pipe {}'
' -pedantic-errors -Werror {} {} -D{}DEBUG -fwrapv {} {} -pipe {}'
).format(
optimize, ' '.join(sanitize_args), stack_protector, missing_braces, '-march=native'
optimize, ' '.join(sanitize_args), ('' if debug else 'N'), stack_protector, missing_braces, '-march=native'
if native_optimizations else ''
)
)