[clang] Fix libdl linking for libclang in standalone mode

Differential Revision: https://reviews.llvm.org/D81385
This commit is contained in:
Tobias Hieta 2020-07-24 00:10:22 +03:00 committed by Martin Storsjö
parent 38a8217931
commit a41af6e41e
1 changed files with 6 additions and 1 deletions

View File

@ -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)