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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ad9171..d336eed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,20 +48,6 @@
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 @@
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.