Index: compiler-rt/trunk/cmake/config-ix.cmake =================================================================== --- compiler-rt/trunk/cmake/config-ix.cmake +++ compiler-rt/trunk/cmake/config-ix.cmake @@ -164,15 +164,7 @@ 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}) Index: compiler-rt/trunk/lib/lsan/lsan_common.h =================================================================== --- compiler-rt/trunk/lib/lsan/lsan_common.h +++ compiler-rt/trunk/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 Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc +++ compiler-rt/trunk/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 @@ } } // namespace __sanitizer -#endif // SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__)) +#endif // SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__)) || + // defined(__mips64) || defined(__i386))