meson: Disable asserts in release builds

vencrypt
Andri Yngvason 2020-01-22 22:03:37 +00:00
parent 0572693f21
commit ba8267a4cd
1 changed files with 10 additions and 2 deletions

View File

@ -8,10 +8,18 @@ project(
], ],
) )
add_project_arguments([ buildtype = get_option('buildtype')
c_args = [
'-D_GNU_SOURCE', '-D_GNU_SOURCE',
'-fvisibility=hidden', '-fvisibility=hidden',
], language: 'c') ]
if buildtype == 'release' or buildtype == 'plain'
c_args += '-DNDEBUG'
endif
add_project_arguments(c_args, language: 'c')
cc = meson.get_compiler('c') cc = meson.get_compiler('c')