This revision was automatically updated to reflect the committed changes. Closed by commit rGa41af6e41e6f: [clang] Fix libdl linking for libclang in standalone mode (authored by thieta, committed by mstorsjo).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81385/new/ https://reviews.llvm.org/D81385 Files: clang/tools/libclang/CMakeLists.txt Index: clang/tools/libclang/CMakeLists.txt =================================================================== --- clang/tools/libclang/CMakeLists.txt +++ clang/tools/libclang/CMakeLists.txt @@ -68,7 +68,12 @@ 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)
Index: clang/tools/libclang/CMakeLists.txt =================================================================== --- clang/tools/libclang/CMakeLists.txt +++ clang/tools/libclang/CMakeLists.txt @@ -68,7 +68,12 @@ 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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits