[compiler-rt] r298946 - Enable i386 builds for darwin lsan
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 14:56:44 PDT 2017
Author: fjricci
Date: Tue Mar 28 16:56:44 2017
New Revision: 298946
URL: http://llvm.org/viewvc/llvm-project?rev=298946&view=rev
Log:
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
Modified:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/lib/lsan/lsan_common.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=298946&r1=298945&r2=298946&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Tue Mar 28 16:56:44 2017
@@ -164,15 +164,7 @@ set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH
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})
Modified: compiler-rt/trunk/lib/lsan/lsan_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_common.h?rev=298946&r1=298945&r2=298946&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.h (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common.h Tue Mar 28 16:56:44 2017
@@ -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
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc?rev=298946&r1=298945&r2=298946&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc Tue Mar 28 16:56:44 2017
@@ -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))
More information about the llvm-commits
mailing list