From: Rafael Espindola Date: Tue, 20 Jan 2015 21:10:35 +0000 (+0000) Subject: Link libclang with dl if available. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f00d8b0a11be0325bfa4573cd7f0c98cf231016f;p=clang Link libclang with dl if available. This is in preparation for changing the link to use -Wl,-z,defs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226609 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt index f1c3f4ca8b..26f88a97c5 100644 --- a/tools/libclang/CMakeLists.txt +++ b/tools/libclang/CMakeLists.txt @@ -51,6 +51,11 @@ if (CLANG_ENABLE_ARCMT) list(APPEND LIBS clangARCMigrate) endif () +find_library(DL_LIBRARY_PATH dl) +if (DL_LIBRARY_PATH) + list(APPEND LIBS dl) +endif() + option(LIBCLANG_BUILD_STATIC "Build libclang as a static library (in addition to a shared one)" OFF)