Skip to content

Commit a41af6e

Browse files
trumstorsjo
authored andcommitted
[clang] Fix libdl linking for libclang in standalone mode
Differential Revision: https://reviews.llvm.org/D81385
1 parent 38a8217 commit a41af6e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/tools/libclang/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ endif ()
6868

6969
if (HAVE_LIBDL)
7070
list(APPEND LIBS ${CMAKE_DL_LIBS})
71-
endif()
71+
elseif (CLANG_BUILT_STANDALONE)
72+
find_library(DL_LIBRARY_PATH dl)
73+
if (DL_LIBRARY_PATH)
74+
list(APPEND LIBS dl)
75+
endif ()
76+
endif ()
7277

7378
option(LIBCLANG_BUILD_STATIC
7479
"Build libclang as a static library (in addition to a shared one)" OFF)

0 commit comments

Comments
 (0)