Add -DNDEBUG flag for release build

This commit is contained in:
Yuxuan Shui 2018-10-15 11:16:32 +01:00
parent 46a6a391b6
commit 93dd2d92fd
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,10 @@ cc = meson.get_compiler('c')
add_global_arguments('-std=c11', language: 'c')
if get_option('buildtype') == 'release'
add_global_arguments('-DNDEBUG', language: 'c')
endif
if get_option('sanitize')
sanitizers = ['address', 'undefined']
if cc.has_argument('-fsanitize=integer')