diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-05-20 14:16:45 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-05-20 14:16:45 +0000 |
commit | 74799cad0c370391a087567507a59c5dba1348ab (patch) | |
tree | a3538b09fbf5663149ac16606f7acba6fcaff18f /lib/lsan/CMakeLists.txt | |
parent | b9c9ce7dfdc0564ddc64f409a995265a3ee89634 (diff) |
Build LSan on x86_64 only if this target is supported
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/CMakeLists.txt')
-rw-r--r-- | lib/lsan/CMakeLists.txt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/lsan/CMakeLists.txt b/lib/lsan/CMakeLists.txt index 73b96a2e2..1ac0072e9 100644 --- a/lib/lsan/CMakeLists.txt +++ b/lib/lsan/CMakeLists.txt @@ -14,13 +14,17 @@ set(LSAN_SOURCES set(LSAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LSAN_RUNTIME_LIBRARIES) -set(arch "x86_64") -add_compiler_rt_static_runtime(clang_rt.lsan-${arch} ${arch} - SOURCES ${LSAN_SOURCES} - $<TARGET_OBJECTS:RTInterception.${arch}> - $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> - $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> - CFLAGS ${LSAN_CFLAGS}) -list(APPEND LSAN_RUNTIME_LIBRARIES clang_rt.lsan-${arch}) + +# FIXME: support LSan for other arches. +if(CAN_TARGET_x86_64) + set(arch "x86_64") + add_compiler_rt_static_runtime(clang_rt.lsan-${arch} ${arch} + SOURCES ${LSAN_SOURCES} + $<TARGET_OBJECTS:RTInterception.${arch}> + $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> + $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> + CFLAGS ${LSAN_CFLAGS}) + list(APPEND LSAN_RUNTIME_LIBRARIES clang_rt.lsan-${arch}) +endif() add_subdirectory(tests) |