Skip to content

Commit e15f424

Browse files
committed
[LSAN] Fix CAN_SANITIZE_LEAKS on Android
1 parent bf14685 commit e15f424

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

compiler-rt/lib/lsan/lsan_common.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@
2929
// To enable LeakSanitizer on a new architecture, one needs to implement the
3030
// internal_clone function as well as (probably) adjust the TLS machinery for
3131
// the new architecture inside the sanitizer library.
32-
#if (SANITIZER_LINUX && \
33-
(!SANITIZER_ANDROID || defined(ANDROID_HAS_ELF_TLS)) || \
34-
SANITIZER_MAC) && \
32+
#if ((SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC) && \
3533
(SANITIZER_WORDSIZE == 64) && \
3634
(defined(__x86_64__) || defined(__mips64) || defined(__aarch64__) || \
3735
defined(__powerpc64__) || defined(__s390x__))
3836
#define CAN_SANITIZE_LEAKS 1
39-
#elif defined(__i386__) && \
40-
(SANITIZER_LINUX && \
41-
(!SANITIZER_ANDROID || defined(ANDROID_HAS_ELF_TLS)) || \
42-
SANITIZER_MAC)
37+
#elif defined(__i386__) && \
38+
((SANITIZER_LINUX && !SANITIZER_ANDROID) || SANITIZER_MAC)
4339
#define CAN_SANITIZE_LEAKS 1
4440
#elif defined(__arm__) && SANITIZER_LINUX && !SANITIZER_ANDROID
4541
#define CAN_SANITIZE_LEAKS 1

0 commit comments

Comments
 (0)