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'.
This commit is contained in:
committed by
Lennart Poettering
parent
51b66c7a8a
commit
d18cb3937b
+1
-1
@@ -281,7 +281,7 @@ static const struct hashmap_type_info hashmap_type_info[_HASHMAP_TYPE_MAX] = {
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef VALGRIND
|
||||
#if VALGRIND
|
||||
__attribute__((destructor)) static void cleanup_pools(void) {
|
||||
_cleanup_free_ char *t = NULL;
|
||||
int r;
|
||||
|
||||
Reference in New Issue
Block a user