summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-04-01 13:16:30 +0000
committerAlexey Samsonov <samsonov@google.com>2014-04-01 13:16:30 +0000
commitd6535ea4c4d49078a93735b315b8518fb692a592 (patch)
treee114342968d294d188587a94d6dea587a66e3f19 /cmake/Modules
parentf9470a30623dab95050c32e10576d706b13675dd (diff)
[ASan] Optional support for dynamic ASan runtime on Linux.
Based on http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 556ada48a..82947eac4 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -45,7 +45,7 @@ endmacro()
# DEFS <compile definitions>)
macro(add_compiler_rt_runtime name arch type)
if(CAN_TARGET_${arch})
- parse_arguments(LIB "SOURCES;CFLAGS;DEFS" "" ${ARGN})
+ parse_arguments(LIB "SOURCES;CFLAGS;DEFS;OUTPUT_NAME" "" ${ARGN})
add_library(${name} ${type} ${LIB_SOURCES})
# Setup compile flags and definitions.
set_target_compile_flags(${name}
@@ -58,6 +58,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)
+ set_target_properties(${name} PROPERTIES
+ OUTPUT_NAME ${LIB_OUTPUT_NAME})
+ endif()
# Add installation command.
install(TARGETS ${name}
ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}