Index: lib/asan/tests/asan_test.cc =================================================================== --- lib/asan/tests/asan_test.cc +++ lib/asan/tests/asan_test.cc @@ -117,7 +117,7 @@ } // No valloc on Windows or Android. -#if !defined(_WIN32) && !defined(ANDROID) && !defined(__ANDROID__) +#if !defined(_WIN32) && !defined(__ANDROID__) TEST(AddressSanitizer, VallocTest) { void *a = valloc(100); EXPECT_EQ(0U, (uintptr_t)a % kPageSize); @@ -769,7 +769,7 @@ return MallocAndMemsetString(size, 'z'); } -#if defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__) +#if defined(__linux__) && !defined(__ANDROID__) #define READ_TEST(READ_N_BYTES) \ char *x = new char[10]; \ int fd = open("/proc/self/stat", O_RDONLY); \ @@ -792,7 +792,7 @@ TEST(AddressSanitizer, read) { READ_TEST(read(fd, x, 15)); } -#endif // defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__) +#endif // defined(__linux__) && !defined(__ANDROID__) // This test case fails // Clang optimizes memcpy/memset calls which lead to unaligned access @@ -1153,7 +1153,7 @@ // https://code.google.com/p/address-sanitizer/issues/detail?id=131 // Windows support is tracked here: // https://code.google.com/p/address-sanitizer/issues/detail?id=309 -#if !defined(ANDROID) && !defined(__ANDROID__) && \ +#if !defined(__ANDROID__) && \ !defined(__APPLE__) && \ !defined(_WIN32) static string MismatchStr(const string &str) { Index: lib/builtins/clear_cache.c =================================================================== --- lib/builtins/clear_cache.c +++ lib/builtins/clear_cache.c @@ -17,11 +17,11 @@ #include #endif -#if defined(ANDROID) && defined(__mips__) +#if defined(__ANDROID__) && defined(__mips__) #include #endif -#if defined(ANDROID) && defined(__arm__) +#if defined(__ANDROID__) && defined(__arm__) #include #endif @@ -46,7 +46,7 @@ arg.len = (uintptr_t)end - (uintptr_t)start; sysarch(ARM_SYNC_ICACHE, &arg); - #elif defined(ANDROID) + #elif defined(__ANDROID__) const register int start_reg __asm("r0") = (int) (intptr_t) start; const register int end_reg __asm("r1") = (int) (intptr_t) end; const register int flags __asm("r2") = 0; @@ -59,7 +59,7 @@ #else compilerrt_abort(); #endif -#elif defined(ANDROID) && defined(__mips__) +#elif defined(__ANDROID__) && defined(__mips__) const uintptr_t start_int = (uintptr_t) start; const uintptr_t end_int = (uintptr_t) end; _flush_cache(start, (end_int - start_int), BCACHE); Index: lib/sanitizer_common/sanitizer_platform.h =================================================================== --- lib/sanitizer_common/sanitizer_platform.h +++ lib/sanitizer_common/sanitizer_platform.h @@ -49,7 +49,7 @@ # define SANITIZER_WINDOWS 0 #endif -#if defined(__ANDROID__) || defined(ANDROID) +#if defined(__ANDROID__) # define SANITIZER_ANDROID 1 #else # define SANITIZER_ANDROID 0 Index: lib/sanitizer_common/tests/sanitizer_test_utils.h =================================================================== --- lib/sanitizer_common/tests/sanitizer_test_utils.h +++ lib/sanitizer_common/tests/sanitizer_test_utils.h @@ -95,13 +95,13 @@ // Set availability of platform-specific functions. -#if !defined(__APPLE__) && !defined(ANDROID) && !defined(__ANDROID__) && !defined(_WIN32) +#if !defined(__APPLE__) && !defined(__ANDROID__) && !defined(_WIN32) # define SANITIZER_TEST_HAS_POSIX_MEMALIGN 1 #else # define SANITIZER_TEST_HAS_POSIX_MEMALIGN 0 #endif -#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(ANDROID) && \ +#if !defined(__APPLE__) && !defined(__FreeBSD__) && \ !defined(__ANDROID__) && !defined(_WIN32) # define SANITIZER_TEST_HAS_MEMALIGN 1 # define SANITIZER_TEST_HAS_PVALLOC 1