]> granicus.if.org Git - clang/commitdiff
Link libclang with dl if available.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 20 Jan 2015 21:10:35 +0000 (21:10 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 20 Jan 2015 21:10:35 +0000 (21:10 +0000)
This is in preparation for changing the link to use -Wl,-z,defs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226609 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CMakeLists.txt

index f1c3f4ca8b23f7272d39c76fa4db0b01e6e39835..26f88a97c5744af648e54b436171d9b3f4090704 100644 (file)
@@ -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)