r226609 - Link libclang with dl if available.

Rafael Espindola rafael.espindola at gmail.com
Tue Jan 20 13:10:35 PST 2015


Author: rafael
Date: Tue Jan 20 15:10:35 2015
New Revision: 226609

URL: http://llvm.org/viewvc/llvm-project?rev=226609&view=rev
Log:
Link libclang with dl if available.

This is in preparation for changing the link to use -Wl,-z,defs.

Modified:
    cfe/trunk/tools/libclang/CMakeLists.txt

Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=226609&r1=226608&r2=226609&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Tue Jan 20 15:10:35 2015
@@ -51,6 +51,11 @@ if (CLANG_ENABLE_ARCMT)
   list(APPEND LIBS clangARCMigrate)
 endif ()
 
+find_library(DL_LIBRARY_PATH dl)
+if (DL_LIBRARY_PATH)
+  list(APPEND LIBS dl)
+endif()
+
 option(LIBCLANG_BUILD_STATIC
   "Build libclang as a static library (in addition to a shared one)" OFF)
 





More information about the cfe-commits mailing list