[PATCH] Do not link the dyndd runtime library against libdl on FreeBSD
Ed Maste
emaste at freebsd.org
Fri Sep 5 07:28:46 PDT 2014
================
Comment at: lib/tsan/dd/CMakeLists.txt:27
@@ +26,3 @@
+# There is no libdl on FreeBSD.
+if(NOT ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
+ list(APPEND DD_LINKLIBS dl)
----------------
There are a couple of examples of optionally adding -ldl without relying on the system name, in other llvm projects:
`lib/Support/CMakeLists.txt`:
```
if( HAVE_LIBDL )
set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
```
`projects/libcxxabi/src/Unwind/CMakeLists.txt`:
```
append_if(libraries LIBCXXABI_HAS_DL_LIB dl)
```
http://reviews.llvm.org/D5207
More information about the llvm-commits
mailing list