summaryrefslogtreecommitdiff
path: root/cmake/Modules
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 /cmake/Modules
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 'cmake/Modules')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index a3efc8d6e..aafccd47d 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -43,7 +43,8 @@ endmacro()
# add_compiler_rt_runtime(<name> <arch> {STATIC,SHARED}
# SOURCES <source files>
# CFLAGS <compile flags>
-# DEFS <compile definitions>)
+# DEFS <compile definitions>
+# OUTPUT_NAME <output library name>)
macro(add_compiler_rt_runtime name arch type)
if(CAN_TARGET_${arch})
parse_arguments(LIB "SOURCES;CFLAGS;DEFS;OUTPUT_NAME" "" ${ARGN})
@@ -59,7 +60,10 @@ macro(add_compiler_rt_runtime name arch type)
set_target_properties(${name} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
- if (LIB_OUTPUT_NAME)
+ if ("${LIB_OUTPUT_NAME}" STREQUAL "")
+ set_target_properties(${name} PROPERTIES
+ OUTPUT_NAME ${name}${COMPILER_RT_OS_SUFFIX})
+ else()
set_target_properties(${name} PROPERTIES
OUTPUT_NAME ${LIB_OUTPUT_NAME})
endif()