From 93ceb1a9933657d732faedc616bc5d0c85f94df4 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 29 May 2019 15:11:06 +0800 Subject: [PATCH] [llvm]Fix build error on x64-windows. (#6631) --- ports/llvm/CONTROL | 2 +- ports/llvm/fix-build-error.patch | 16 ++++++++++++++++ ports/llvm/portfile.cmake | 4 +++- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 ports/llvm/fix-build-error.patch diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index d4e631680f548e..1bc8335fc08477 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ Source: llvm -Version: 7.0.0-2 +Version: 7.0.0-3 Description: The LLVM Compiler Infrastructure Build-Depends: atlmfc (windows) diff --git a/ports/llvm/fix-build-error.patch b/ports/llvm/fix-build-error.patch new file mode 100644 index 00000000000000..a311fb959f9dd4 --- /dev/null +++ b/ports/llvm/fix-build-error.patch @@ -0,0 +1,16 @@ +diff --git a/tools/clang/tools/libclang/CMakeLists.txt b/tools/clang/tools/libclang/CMakeLists.txt +index e539c83..09c1ea3 100644 +--- a/tools/clang/tools/libclang/CMakeLists.txt ++++ b/tools/clang/tools/libclang/CMakeLists.txt +@@ -56,10 +56,7 @@ if (TARGET clangTidyPlugin) + endif() + endif () + +-find_library(DL_LIBRARY_PATH dl) +-if (DL_LIBRARY_PATH) +- list(APPEND LIBS dl) +-endif() ++list(APPEND LIBS "${DL_LIBRARY_PATH}") + + option(LIBCLANG_BUILD_STATIC + "Build libclang as a static library (in addition to a shared one)" OFF) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index a471ec1aeb1e77..1828ea86e6c355 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -28,7 +28,9 @@ endif() vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch + PATCHES + install-cmake-modules-to-share.patch + fix-build-error.patch ) vcpkg_find_acquire_program(PYTHON3)