diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-30 22:52:34 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-30 22:53:01 +0100 |
commit | 0d9cb78f036554de8a9adc9196769e1fc709ea39 (patch) | |
tree | 5c8ace3413000916c42e52ea340fd8a3506855cd /meson.build | |
parent | 1db233648fee07903f030adb4c94d8d76d4c3f8b (diff) | |
download | fiv-0d9cb78f036554de8a9adc9196769e1fc709ea39.tar.gz fiv-0d9cb78f036554de8a9adc9196769e1fc709ea39.tar.xz fiv-0d9cb78f036554de8a9adc9196769e1fc709ea39.zip |
Force sanitizers for debug builds
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 3780515..34508c6 100644 --- a/meson.build +++ b/meson.build @@ -6,6 +6,13 @@ add_project_arguments( language : 'c', ) +if get_option('buildtype').startswith('debug') + flags = meson.get_compiler('c').get_supported_arguments( + '-fsanitize=address,undefined') + add_project_arguments(flags, language : ['c']) + add_project_link_arguments(flags, language : ['c']) +endif + # TODO(p): Use libraw_r later, when we start parallelizing/preloading. libraw = dependency('libraw', required : get_option('libraw')) librsvg = dependency('librsvg-2.0', required : get_option('librsvg')) |