[PATCH] D71369: Detect libdl from cmake variable
Khem Raj via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 11 11:10:14 PST 2019
raj.khem created this revision.
raj.khem added a reviewer: espindola.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.
This helps in getting right settings for libdl irrespective of platform
it also fixes build with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
Fixes
tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexer.cpp.o: In function clang::CIndexer::getClangResourcesPath[abi:cxx11]()': 2019-12-06T06:04:39.2987601Z | CIndexer.cpp:(.text._ZN5clang8CIndexer21getClangResourcesPathB5cxx11Ev+0x8b): undefined reference to dladdr'
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71369
Files:
clang/tools/libclang/CMakeLists.txt
Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -60,9 +60,8 @@
endif()
endif ()
-find_library(DL_LIBRARY_PATH dl)
-if (DL_LIBRARY_PATH)
- list(APPEND LIBS dl)
+if (HAVE_LIBDL)
+ list(APPEND LIBS ${CMAKE_DL_LIBS})
endif()
option(LIBCLANG_BUILD_STATIC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71369.233417.patch
Type: text/x-patch
Size: 408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191211/2f6a568c/attachment-0001.bin>
More information about the cfe-commits
mailing list