1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

util-lib: introduce HAS_FEATURE_ADDRESS_SANITIZER

https://clang.llvm.org/docs/AddressSanitizer.html#conditional-compilation-with-has-feature-address-sanitizer
This commit is contained in:
Evgeny Vereshchagin 2018-12-02 08:28:24 +01:00 committed by Lennart Poettering
parent f36c39aae5
commit 289acab951

View File

@ -60,6 +60,17 @@
# endif
#endif
#if !defined(HAS_FEATURE_ADDRESS_SANITIZER)
# if defined(__has_feature)
# if __has_feature(address_sanitizer)
# define HAS_FEATURE_ADDRESS_SANITIZER 1
# endif
# endif
# if !defined(HAS_FEATURE_ADDRESS_SANITIZER)
# define HAS_FEATURE_ADDRESS_SANITIZER 0
# endif
#endif
/* Temporarily disable some warnings */
#define DISABLE_WARNING_FORMAT_NONLITERAL \
_Pragma("GCC diagnostic push"); \