summaryrefslogtreecommitdiff
path: root/lib/msan/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-01-20 14:14:13 +0000
committerAlexey Samsonov <samsonov@google.com>2013-01-20 14:14:13 +0000
commit7eca152ea59510d51b01b764fc96852a34e9d6bc (patch)
tree520c8710baaf5c0d1083463e7ebabce1f8e372c9 /lib/msan/CMakeLists.txt
parente16af95daecd44b32940fe910fac2deee3220ac1 (diff)
CMake: use add_compiler_rt_static_runtime to build TSan and MSan runtimes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/CMakeLists.txt')
-rw-r--r--lib/msan/CMakeLists.txt20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/msan/CMakeLists.txt b/lib/msan/CMakeLists.txt
index bb8dbccbe..42c48ca9c 100644
--- a/lib/msan/CMakeLists.txt
+++ b/lib/msan/CMakeLists.txt
@@ -18,17 +18,15 @@ set(MSAN_RTL_CFLAGS
# Static runtime library.
set(MSAN_RUNTIME_LIBRARIES)
-add_library(clang_rt.msan-x86_64 STATIC
- ${MSAN_RTL_SOURCES}
- $<TARGET_OBJECTS:RTInterception.x86_64>
- $<TARGET_OBJECTS:RTSanitizerCommon.x86_64>
- )
-set_target_compile_flags(clang_rt.msan-x86_64
- ${MSAN_RTL_CFLAGS} ${TARGET_x86_64_CFLAGS}
- )
-list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-x86_64)
-
-add_clang_compiler_rt_libraries(${MSAN_RUNTIME_LIBRARIES})
+set(arch "x86_64")
+if(CAN_TARGET_${arch})
+ add_compiler_rt_static_runtime(clang_rt.msan-${arch} ${arch}
+ SOURCES ${MSAN_RTL_SOURCES}
+ $<TARGET_OBJECTS:RTInterception.${arch}>
+ $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
+ CFLAGS ${MSAN_RTL_CFLAGS})
+ list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-${arch})
+endif()
if(LLVM_INCLUDE_TESTS)
add_subdirectory(tests)