[clang] 0073c29 - [clang] Avoid linking libdl unless needed
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Thu May 28 11:08:09 PDT 2020
Author: Tobias Hieta
Date: 2020-05-28T21:08:00+03:00
New Revision: 0073c293a401774ac96b4b3d27f05e13f379f98e
URL: https://github.com/llvm/llvm-project/commit/0073c293a401774ac96b4b3d27f05e13f379f98e
DIFF: https://github.com/llvm/llvm-project/commit/0073c293a401774ac96b4b3d27f05e13f379f98e.diff
LOG: [clang] Avoid linking libdl unless needed
Differential Revision: https://reviews.llvm.org/D80492
Added:
Modified:
clang/tools/libclang/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
index ba286b672772..9b34682cc49b 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -66,9 +66,8 @@ if (LIBCLANG_INCLUDE_CLANG_TOOLS_EXTRA)
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
More information about the cfe-commits
mailing list