[compiler-rt] r217944 - Do not link the dyndd runtime library against libdl on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Wed Sep 17 00:54:46 PDT 2014


Author: vkutuzov
Date: Wed Sep 17 02:54:46 2014
New Revision: 217944

URL: http://llvm.org/viewvc/llvm-project?rev=217944&view=rev
Log:
Do not link the dyndd runtime library against libdl on FreeBSD
Differential Revision: http://reviews.llvm.org/D5207

Modified:
    compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt

Modified: compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt?rev=217944&r1=217943&r2=217944&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/dd/CMakeLists.txt Wed Sep 17 02:54:46 2014
@@ -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 AP
             $<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)





More information about the llvm-commits mailing list