Only define __asan_default_options in make develop builds

`NDEBUG` is not defined in `develop`, `debug`, `profile`, and `coverage`
builds.
`__SANITIZE_ADDRESS__` is defined in `develop` builds.
This commit is contained in:
Rangi42
2024-12-31 11:01:26 -05:00
parent 8363f25d47
commit 5963dc9e0e

View File

@@ -13,7 +13,7 @@
#define __SANITIZE_ADDRESS__ #define __SANITIZE_ADDRESS__
#endif #endif
#endif #endif
#if defined(__SANITIZE_ADDRESS__) && !defined(__APPLE__) #if !defined(NDEBUG) && defined(__SANITIZE_ADDRESS__) && !defined(__APPLE__)
extern "C" { extern "C" {
char const *__asan_default_options(void) { char const *__asan_default_options(void) {
return "detect_leaks=1"; return "detect_leaks=1";