diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-08-08 20:49:20 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-08-08 20:49:20 +0000 |
commit | d1348d80663566a292d1955b37f33ed4066ff201 (patch) | |
tree | 93827cc64955ef12c2e782632435a0dacbf89190 /lib/ubsan | |
parent | 8b950ead2228ba5b170432c35bfea27ac62a8994 (diff) |
Enable ubsan on NetBSD
Summary:
Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, vitalybuka, kcc, filcab, fjricci
Reviewed By: fjricci
Subscribers: srhines, kubamracek, mgorny, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D36483
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan')
-rw-r--r-- | lib/ubsan/ubsan_platform.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ubsan/ubsan_platform.h b/lib/ubsan/ubsan_platform.h index 26e89f8c9..a26c37557 100644 --- a/lib/ubsan/ubsan_platform.h +++ b/lib/ubsan/ubsan_platform.h @@ -14,9 +14,10 @@ #define UBSAN_PLATFORM_H // Other platforms should be easy to add, and probably work as-is. -#if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) && \ - (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \ - defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \ +#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__) |