Skip to content

Commit

Permalink
[clang] Fix libdl linking for libclang in standalone mode
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D81385
  • Loading branch information
tru authored and mstorsjo committed Jul 23, 2020
1 parent 38a8217 commit a41af6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clang/tools/libclang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ endif ()

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)
Expand Down

0 comments on commit a41af6e

Please sign in to comment.