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:
parent
f36c39aae5
commit
289acab951
@ -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"); \
|
||||
|
Loading…
Reference in New Issue
Block a user