From b3dfe7548c17e23f4a34494667b4d7f0bb0097be Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 8 May 2018 01:01:54 +0200 Subject: main/clang: fix ClangConfig.cmake to look for LLVM on correct path --- .../0008-Fix-ClangConfig-cmake-LLVM-path.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch (limited to 'main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch') diff --git a/main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch b/main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch new file mode 100644 index 0000000000..f1c1c24499 --- /dev/null +++ b/main/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch @@ -0,0 +1,25 @@ +From: Adeel +Date: Sun, 6 May 2018 10:22:00 +0200 +Subject: [PATCH] Fix ClangConfig.cmake to look for LLVM-Config.cmake in correct location + +This results in the following change in the generated ClangConfig.cmake: + + find_package(LLVM REQUIRED CONFIG + - HINTS "${CLANG_INSTALL_PREFIX}/lib/cmake/llvm") + + HINTS "/usr/lib/llvm5/lib/cmake/llvm") + +This is needed e.g. for building lldb. + +See https://github.com/alpinelinux/aports/pull/2342 for more information. + +--- a/cmake/modules/CMakeLists.txt ++++ b/cmake/modules/CMakeLists.txt +@@ -39,7 +39,7 @@ foreach(p ${_count}) + get_filename_component(CLANG_INSTALL_PREFIX \"\${CLANG_INSTALL_PREFIX}\" PATH)") + endforeach(p) + set(CLANG_CONFIG_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${CLANG_INSTALL_PACKAGE_DIR}") +-set(CLANG_CONFIG_LLVM_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}") ++set(CLANG_CONFIG_LLVM_CMAKE_DIR "${llvm_cmake_builddir}") + set(CLANG_CONFIG_EXPORTS_FILE "\${CLANG_CMAKE_DIR}/ClangTargets.cmake") + set(CLANG_CONFIG_INCLUDE_DIRS + "\${CLANG_INSTALL_PREFIX}/include" -- cgit v1.2.3