summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-09-29 13:18:55 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-09-29 13:18:55 +0000
commit44014739f2d5d33a9030f68b4621b29b7dbf88ab (patch)
tree62044714609894a5a3af05634b6a65c0e3456274 /CMakeLists.txt
parent8cf642b8dac6eefa2c707a67dea810629aa13e10 (diff)
[sanitizer] Android build cleanup.
* Detect Android toolchain target arch and set correct runtime library name. * Merged a lot of Android and non-Android code paths. * Android is only supported in standalone build of compiler-rt now. * Linking lsan-common in ASan-Android (makes lsan annotations work). * Relying on -fsanitize=address linker flag when building tests (again, unification with non-Android path). * Runtime library moved from lib/asan to lib/linux. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb8ffd5f9..2dc932f06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,7 +207,8 @@ option(COMPILER_RT_DEBUG "Build runtimes with full debug info" OFF)
pythonize_bool(COMPILER_RT_DEBUG)
# We have to support both static and dynamic/shared runtime on Windows.
-if(WIN32)
+# Android only works with dynamic runtime.
+if(WIN32 OR ANDROID)
option(COMPILER_RT_BUILD_SHARED_ASAN "Build shared version of AddressSanitizer runtime" ON)
else()
option(COMPILER_RT_BUILD_SHARED_ASAN "Build shared version of AddressSanitizer runtime" OFF)