aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2014-09-17 07:54:46 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2014-09-17 07:54:46 +0000
commit68b3e87263243a32f677e2bf56ed5060a0e9da3a (patch)
tree7ef62a422a939d453a7fcb983d352fd312789178
parent308b93f6e44c2cb7b6b7c241cf9dcd31298a7d66 (diff)
downloadllvm-68b3e87263243a32f677e2bf56ed5060a0e9da3a.zip
llvm-68b3e87263243a32f677e2bf56ed5060a0e9da3a.tar.gz
llvm-68b3e87263243a32f677e2bf56ed5060a0e9da3a.tar.bz2
Do not link the dyndd runtime library against libdl on FreeBSD
Differential Revision: http://reviews.llvm.org/D5207 llvm-svn: 217944
-rw-r--r--compiler-rt/lib/tsan/dd/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/dd/CMakeLists.txt b/compiler-rt/lib/tsan/dd/CMakeLists.txt
index 9328721..0c9f601 100644
--- a/compiler-rt/lib/tsan/dd/CMakeLists.txt
+++ b/compiler-rt/lib/tsan/dd/CMakeLists.txt
@@ -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)