summaryrefslogtreecommitdiff
path: root/libsanitizer/ubsan/ubsan_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsanitizer/ubsan/ubsan_platform.h')
-rw-r--r--libsanitizer/ubsan/ubsan_platform.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/libsanitizer/ubsan/ubsan_platform.h b/libsanitizer/ubsan/ubsan_platform.h
index e73df632302..75d06646ce8 100644
--- a/libsanitizer/ubsan/ubsan_platform.h
+++ b/libsanitizer/ubsan/ubsan_platform.h
@@ -11,19 +11,14 @@
#ifndef UBSAN_PLATFORM_H
#define UBSAN_PLATFORM_H
-#ifndef CAN_SANITIZE_UB
// Other platforms should be easy to add, and probably work as-is.
-#if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
- defined(__NetBSD__)) && \
- (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
- defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
- defined(__s390__))
-# define CAN_SANITIZE_UB 1
-#elif defined(_WIN32) || defined(__Fuchsia__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
+ defined(__NetBSD__) || defined(__OpenBSD__) || \
+ (defined(__sun__) && defined(__svr4__)) || \
+ defined(_WIN32) || defined(__Fuchsia__) || defined(__rtems__)
# define CAN_SANITIZE_UB 1
#else
# define CAN_SANITIZE_UB 0
#endif
-#endif //CAN_SANITIZE_UB
#endif