Do not link the dyndd runtime library against libdl on FreeBSD

Differential Revision: http://reviews.llvm.org/D5207

llvm-svn: 217944
This commit is contained in:
Viktor Kutuzov 2014-09-17 07:54:46 +00:00
parent 308b93f6e4
commit 68b3e87263
1 changed files with 5 additions and 1 deletions

View File

@ -22,6 +22,10 @@ set(DD_HEADERS
dd_rtl.h
)
set(DD_LINKLIBS)
append_if(COMPILER_RT_HAS_LIBDL dl DD_LINKLIBS)
append_if(COMPILER_RT_HAS_LIBPTHREAD pthread DD_LINKLIBS)
add_custom_target(dd)
# Deadlock detector is currently supported on 64-bit Linux only.
if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE AND NOT ANDROID)
@ -43,7 +47,7 @@ if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE AND NOT ANDROID)
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>)
target_link_libraries(clang_rt.dyndd-${arch} pthread dl)
target_link_libraries(clang_rt.dyndd-${arch} ${DD_LINKLIBS})
endif()
add_dependencies(compiler-rt dd)