[PATCH] D81385: Fix libdl linking for libclang in standalone mode

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 23 14:12:09 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa41af6e41e6f: [clang] Fix libdl linking for libclang in standalone mode (authored by thieta, committed by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81385/new/

https://reviews.llvm.org/D81385

Files:
  clang/tools/libclang/CMakeLists.txt


Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -68,7 +68,12 @@
 
 if (HAVE_LIBDL)
   list(APPEND LIBS ${CMAKE_DL_LIBS})
-endif()
+elseif (CLANG_BUILT_STANDALONE)
+  find_library(DL_LIBRARY_PATH dl)
+  if (DL_LIBRARY_PATH)
+    list(APPEND LIBS dl)
+  endif ()
+endif ()
 
 option(LIBCLANG_BUILD_STATIC
   "Build libclang as a static library (in addition to a shared one)" OFF)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81385.280256.patch
Type: text/x-patch
Size: 524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200723/453f84d5/attachment.bin>


More information about the cfe-commits mailing list