diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-03-28 21:56:44 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2017-03-28 21:56:44 +0000 |
commit | ab8529226152d7622562d6b63664eae96c918960 (patch) | |
tree | 1e3ba33a1c5a102d131f9eb59bdf71fd801ae5b5 /compiler-rt | |
parent | b933c3f55422f2657d2017b002e827b82b28a2da (diff) | |
download | bcm5719-llvm-ab8529226152d7622562d6b63664eae96c918960.tar.gz bcm5719-llvm-ab8529226152d7622562d6b63664eae96c918960.zip |
Enable i386 builds for darwin lsan
Summary:
Now that __thread is no longer used for lsan on darwin, i386 builds
can be enabled.
Reviewers: kcc, kubamracek
Subscribers: danalbert, srhines, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D29995
llvm-svn: 298946
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/cmake/config-ix.cmake | 10 | ||||
-rw-r--r-- | compiler-rt/lib/lsan/lsan_common.h | 8 | ||||
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc | 6 |
3 files changed, 10 insertions, 14 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index 027b226462c..e61a4f146df 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -164,15 +164,7 @@ set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64} set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64} ${S390X}) set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64}) - -# Darwin does not support 32-bit thread-local storage on ios versions -# below 9.0. Until the min ios version is bumped to 9.0, lsan will -# not build for 32-bit darwin targets. -if(APPLE) - set(ALL_LSAN_SUPPORTED_ARCH ${X86_64} ${ARM64}) -else() - set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64}) -endif() +set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64}) set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64}) set(ALL_PROFILE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${PPC64} ${MIPS32} ${MIPS64} ${S390X}) diff --git a/compiler-rt/lib/lsan/lsan_common.h b/compiler-rt/lib/lsan/lsan_common.h index c457d1b84a8..cb8126aa575 100644 --- a/compiler-rt/lib/lsan/lsan_common.h +++ b/compiler-rt/lib/lsan/lsan_common.h @@ -30,12 +30,14 @@ // To enable LeakSanitizer on new architecture, one need to implement // internal_clone function as well as (probably) adjust TLS machinery for // new architecture inside sanitizer library. -#if (SANITIZER_LINUX && !SANITIZER_ANDROID || CAN_SANITIZE_LEAKS_MAC) \ - && (SANITIZER_WORDSIZE == 64) && (defined(__x86_64__) \ - || defined(__mips64) || defined(__aarch64__)) +#if (SANITIZER_LINUX && !SANITIZER_ANDROID) && (SANITIZER_WORDSIZE == 64) && \ + (defined(__x86_64__) || defined(__mips64) || defined(__aarch64__)) #define CAN_SANITIZE_LEAKS 1 #elif SANITIZER_LINUX && !SANITIZER_ANDROID && defined(__i386__) #define CAN_SANITIZE_LEAKS 1 +#elif CAN_SANITIZE_LEAKS_MAC && (defined(__x86_64__) || defined(__mips64) || \ + defined(__aarch64__) || defined(__i386__)) +#define CAN_SANITIZE_LEAKS 1 #else #define CAN_SANITIZE_LEAKS 0 #endif diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc index 4cccc295ed5..a7aa2f06c99 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc @@ -13,7 +13,8 @@ #include "sanitizer_platform.h" -#if SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__)) +#if SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__) || \ + defined(__mips64) || defined(__i386)) #include "sanitizer_stoptheworld.h" @@ -35,4 +36,5 @@ uptr SuspendedThreadsList::RegisterCount() { } } // namespace __sanitizer -#endif // SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__)) +#endif // SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__)) || + // defined(__mips64) || defined(__i386)) |