forked from OSchip/llvm-project
Build LSan on x86_64 only if this target is supported
llvm-svn: 182272
This commit is contained in:
parent
b289fe64c1
commit
cbbdfc50ee
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue