summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-20 18:08:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-20 18:08:08 +0100
commit7fb500aa62109f81efb69c32b66505efa8cfdae4 (patch)
treed2f0868e14bce681edf0171159d1b807bd0da7a5 /compat
parent69a8ca7700e571c78a60ebe896319e6c9bc5b62e (diff)
a
Diffstat (limited to 'compat')
-rw-r--r--compat/defs.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/compat/defs.hpp b/compat/defs.hpp
index fe72dda6..b141eba5 100644
--- a/compat/defs.hpp
+++ b/compat/defs.hpp
@@ -80,3 +80,14 @@
#define fm_UNROLL _Pragma("GCC unroll 4")
#endif
#endif
+
+#ifdef __SANITIZE_ADDRESS__
+#define fm_ASAN 1
+#elif defined __has_feature
+#if __has_feature(address_sanitizer)
+#define fm_ASAN 1
+#endif
+#endif
+#ifndef fm_ASAN
+#define fm_ASAN 0
+#endif