ASan: disable flexible mapping and offset on Android. It doesn't work for dynamic ASan runtime there

llvm-svn: 173132
This commit is contained in:
Alexey Samsonov 2013-01-22 07:21:24 +00:00
parent 56fc958506
commit 2f20275730
2 changed files with 5 additions and 3 deletions

View File

@ -33,15 +33,16 @@ include_directories(..)
set(ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
set(ASAN_COMMON_DEFINITIONS
ASAN_HAS_EXCEPTIONS=1
ASAN_FLEXIBLE_MAPPING_AND_OFFSET=1)
ASAN_HAS_EXCEPTIONS=1)
if(ANDROID)
list(APPEND ASAN_COMMON_DEFINITIONS
ASAN_FLEXIBLE_MAPPING_AND_OFFSET=0
ASAN_NEEDS_SEGV=0
ASAN_LOW_MEMORY=1)
else()
list(APPEND ASAN_COMMON_DEFINITIONS
ASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
ASAN_NEEDS_SEGV=1)
endif()

View File

@ -48,16 +48,17 @@ endif()
# Use -D instead of definitions to please custom compile command.
list(APPEND ASAN_UNITTEST_COMMON_CFLAGS
-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
-DASAN_HAS_BLACKLIST=1
-DASAN_HAS_EXCEPTIONS=1
-DASAN_UAR=0)
if(ANDROID)
list(APPEND ASAN_UNITTEST_COMMON_CFLAGS
-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0
-DASAN_LOW_MEMORY=1
-DASAN_NEEDS_SEGV=0)
else()
list(APPEND ASAN_UNITTEST_COMMON_CFLAGS
-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=1
-DASAN_LOW_MEMORY=0
-DASAN_NEEDS_SEGV=1)
endif()