diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-13 22:28:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-05-17 18:54:36 +0200 |
commit | d18cb3937bdc2efede153abce1cd8ddae941d762 (patch) | |
tree | fc85b7d3dcfea9ea6261b79d56bda058b1f76d5e /meson.build | |
parent | core: systemd1.manage-unit-files policy implies systemd1.reload-daemon (diff) | |
download | systemd-d18cb3937bdc2efede153abce1cd8ddae941d762.tar.xz systemd-d18cb3937bdc2efede153abce1cd8ddae941d762.zip |
Turn VALGRIND variable into a meson configuration switch
Configuration through environment variable is inconvenient with meson, because
they cannot be convieniently changed and/or are not preserved during
reconfiguration (https://github.com/mesonbuild/meson/issues/1503).
This adds -Dvalgrind=true/false, which has the advantage that it can be set
at any time with meson configure -Dvalgrind=... and ninja will rebuild targets
as necessary. Additional minor advantages are better consistency with the
options for hashmap debugging, and typo avoidance with '#if' instead of '#ifdef'.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meson.build b/meson.build index aa07ed8e9b..469737819d 100644 --- a/meson.build +++ b/meson.build @@ -774,6 +774,8 @@ endforeach conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap) conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache) +conf.set10('VALGRIND', get_option('valgrind')) + ##################################################################### threads = dependency('threads') @@ -2925,6 +2927,7 @@ foreach tuple : [ ['gshadow'], ['debug hashmap'], ['debug mmap cache'], + ['valgrind', conf.get('VALGRIND') == 1], ] if tuple.length() >= 2 |