Enable PROFILE, TSAN and UBSAN for Android

Summary:
These sanitizers are enabled and used in Android but got built with
Android's build system.  This change enables them in the CMake build
system.

Reviewers: eugenis

Subscribers: llvm-commits, danalbert, srhines, mgorny

Differential Revision: https://reviews.llvm.org/D30127

llvm-svn: 295523
This commit is contained in:
Pirama Arumuga Nainar 2017-02-18 01:12:55 +00:00
parent 62a6b8b2bf
commit a84404c7a4

View File

@ -500,21 +500,21 @@ else()
endif()
if (PROFILE_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows")
OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android")
set(COMPILER_RT_HAS_PROFILE TRUE)
else()
set(COMPILER_RT_HAS_PROFILE FALSE)
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
OS_NAME MATCHES "Darwin|Linux|FreeBSD")
OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android")
set(COMPILER_RT_HAS_TSAN TRUE)
else()
set(COMPILER_RT_HAS_TSAN FALSE)
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows")
OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android")
set(COMPILER_RT_HAS_UBSAN TRUE)
else()
set(COMPILER_RT_HAS_UBSAN FALSE)