summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-09-11 11:55:45 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-09-11 11:55:45 +0000
commit34fc56c43f60be0b85a0e3ce30658fd98951f0b8 (patch)
treef4737661cd3d631d5ee616f03854deecd063425e /CMakeLists.txt
parent7e72e45e3b725ef29b82fd4386c6571d64f9b6cc (diff)
downloadcompiler-rt-34fc56c43f60be0b85a0e3ce30658fd98951f0b8.tar.gz
compiler-rt-34fc56c43f60be0b85a0e3ce30658fd98951f0b8.tar.bz2
compiler-rt-34fc56c43f60be0b85a0e3ce30658fd98951f0b8.tar.xz
CMake build rules for ASan Android runtime and tests.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 7 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ad91715..d336eedd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,20 +48,6 @@ 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})
@@ -106,6 +92,13 @@ function(set_target_compile_flags target)
set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}")
endfunction()
+function(set_target_link_flags target)
+ foreach(arg ${ARGN})
+ set(argstring "${argstring} ${arg}")
+ endforeach()
+ set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}")
+endfunction()
+
# Compute the Clang version from the LLVM version.
# FIXME: We should be able to reuse CLANG_VERSION variable calculated
# in Clang cmake files, instead of copying the rules here.