summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-08-27 14:28:27 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-08-27 14:28:27 +0000
commitb10027729a3b809469f6b6ad40407ca453d6f54a (patch)
treea51b6023b529942d03ffffbd9dddeaf6cf63fa8b /CMakeLists.txt
parent985aaaaf208f43e4b47625e21e9ebc434c5462e3 (diff)
downloadcompiler-rt-b10027729a3b809469f6b6ad40407ca453d6f54a.tar.gz
compiler-rt-b10027729a3b809469f6b6ad40407ca453d6f54a.tar.bz2
compiler-rt-b10027729a3b809469f6b6ad40407ca453d6f54a.tar.xz
CMake build rules for ASan/Android runtime.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a7d9a895..fc0dd486 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,20 @@ try_compile(CAN_TARGET_I386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32}
COMPILE_DEFINITIONS "${TARGET_I386_CFLAGS}"
CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_I386_CFLAGS}")
+if(LLVM_ANDROID_TOOLCHAIN_DIR)
+ if(EXISTS ${LLVM_ANDROID_TOOLCHAIN_DIR}/arm-linux-androideabi)
+ set(CAN_TARGET_ARM_ANDROID 1)
+ set(TARGET_ARM_ANDROID_CFLAGS
+ -target arm-linux-androideabi
+ --sysroot=${LLVM_ANDROID_TOOLCHAIN_DIR}/sysroot
+ -B${LLVM_ANDROID_TOOLCHAIN_DIR}
+ )
+ else()
+ set(CAN_TARGET_ARM_ANDROID 0)
+ endif()
+ # TODO: support i686 and MIPS Android toolchains
+endif()
+
function(filter_available_targets out_var)
set(archs)
foreach(arch ${ARGN})