[LSAN] Fix CAN_SANITIZE_LEAKS on Android

This commit is contained in:
Vitaly Buka 2020-11-04 18:28:51 -08:00
parent bf146857bb
commit e15f424cf9
1 changed files with 3 additions and 7 deletions

View File

@ -29,17 +29,13 @@
// To enable LeakSanitizer on a new architecture, one needs to implement the
// internal_clone function as well as (probably) adjust the TLS machinery for
// the new architecture inside the sanitizer library.
#if (SANITIZER_LINUX && \
(!SANITIZER_ANDROID || defined(ANDROID_HAS_ELF_TLS)) || \
SANITIZER_MAC) && \
#if ((SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC) && \
(SANITIZER_WORDSIZE == 64) && \
(defined(__x86_64__) || defined(__mips64) || defined(__aarch64__) || \
defined(__powerpc64__) || defined(__s390x__))
#define CAN_SANITIZE_LEAKS 1
#elif defined(__i386__) && \
(SANITIZER_LINUX && \
(!SANITIZER_ANDROID || defined(ANDROID_HAS_ELF_TLS)) || \
SANITIZER_MAC)
#elif defined(__i386__) && \
((SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC)
#define CAN_SANITIZE_LEAKS 1
#elif defined(__arm__) && SANITIZER_LINUX && !SANITIZER_ANDROID
#define CAN_SANITIZE_LEAKS 1