From 93dd2d92fd8bc0605119f3862f927b67ae75722e Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 15 Oct 2018 11:16:32 +0100 Subject: [PATCH] Add -DNDEBUG flag for release build --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 2f901b2..83be0b5 100644 --- a/meson.build +++ b/meson.build @@ -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')