diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-09-13 10:18:39 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-09-13 11:39:29 +0200 |
commit | ffad92daa7226f4246808a1a98d26f39d7d42990 (patch) | |
tree | 17771d2fc31b25737a1ec9cf0e94d9e1c5afe74d /sys-devel/clang | |
parent | sys-kernel/gentoo-sources: amd64 stable wrt bug #693478 (diff) | |
download | gentoo-ffad92daa7226f4246808a1a98d26f39d7d42990.tar.gz gentoo-ffad92daa7226f4246808a1a98d26f39d7d42990.tar.bz2 gentoo-ffad92daa7226f4246808a1a98d26f39d7d42990.zip |
sys-devel/clang: Backport non-native build fix for 9.0.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel/clang')
-rw-r--r-- | sys-devel/clang/clang-9.0.0.9999.ebuild | 6 | ||||
-rw-r--r-- | sys-devel/clang/files/9.0.0/0001-clang-unittest-Import-LLVMTestingSupport-if-necessar.patch | 39 |
2 files changed, 45 insertions, 0 deletions
diff --git a/sys-devel/clang/clang-9.0.0.9999.ebuild b/sys-devel/clang/clang-9.0.0.9999.ebuild index 92eaa1de0a74..60b45818fe4b 100644 --- a/sys-devel/clang/clang-9.0.0.9999.ebuild +++ b/sys-devel/clang/clang-9.0.0.9999.ebuild @@ -63,6 +63,12 @@ S=${WORKDIR}/x/y/${P} # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo +PATCHES=( + # fix linking in non-native build (without tools-extra) + # https://bugs.llvm.org/show_bug.cgi?id=43281 + "${FILESDIR}"/9.0.0/0001-clang-unittest-Import-LLVMTestingSupport-if-necessar.patch +) + # Multilib notes: # 1. ABI_* flags control ABIs libclang* is built for only. # 2. clang is always capable of compiling code for all ABIs for enabled diff --git a/sys-devel/clang/files/9.0.0/0001-clang-unittest-Import-LLVMTestingSupport-if-necessar.patch b/sys-devel/clang/files/9.0.0/0001-clang-unittest-Import-LLVMTestingSupport-if-necessar.patch new file mode 100644 index 000000000000..67ae5a8e4dcf --- /dev/null +++ b/sys-devel/clang/files/9.0.0/0001-clang-unittest-Import-LLVMTestingSupport-if-necessar.patch @@ -0,0 +1,39 @@ +From bfb5b0cb86cf90d9fa794f873644aa642b652c43 Mon Sep 17 00:00:00 2001 +From: Michal Gorny <mgorny@gentoo.org> +Date: Thu, 12 Sep 2019 13:06:12 +0000 +Subject: [PATCH] [clang] [unittest] Import LLVMTestingSupport if necessary + +Add LLVMTestingSupport directory from LLVM_MAIN_SRC_DIR when building +clang stand-alone and LLVMTestingSupport library is not present. This +is needed to fix stand-alone builds without clang-tools-extra. + +Differential Revision: https://reviews.llvm.org/D67452 + +llvm-svn: 371733 +--- + clang/unittests/CMakeLists.txt | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt +index 9a41000cf43..4c222e24599 100644 +--- a/unittests/CMakeLists.txt ++++ b/unittests/CMakeLists.txt +@@ -1,6 +1,15 @@ + add_custom_target(ClangUnitTests) + set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests") + ++if(CLANG_BUILT_STANDALONE) ++ # LLVMTestingSupport library is needed for some of the unittests. ++ if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support ++ AND NOT TARGET LLVMTestingSupport) ++ add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support ++ lib/Testing/Support) ++ endif() ++endif() ++ + # add_clang_unittest(test_dirname file1.cpp file2.cpp) + # + # Will compile the list of files together and link against the clang +-- +2.23.0 + |