summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch')
-rw-r--r--sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch b/sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch
new file mode 100644
index 00000000000..61bec21d692
--- /dev/null
+++ b/sys-devel/clang/files/10.0.1/0004-clang-Avoid-linking-c-index-test-to-duplicate-librar.patch
@@ -0,0 +1,29 @@
+From e0df57328dd084d38ea4aac0cfb129fc320eae3f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 19 Jun 2020 17:00:12 +0200
+Subject: [PATCH 4/4] [clang] Avoid linking c-index-test to duplicate libraries
+
+Use clang_target_link_libraries() to link libraries included
+in clang-cpp.so to avoid simultaneously linking to it and to split
+static libraries. This prevents units from being included twice.
+---
+ tools/c-index-test/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
+index ceef4b08637..d83d1091936 100644
+--- a/tools/c-index-test/CMakeLists.txt
++++ b/tools/c-index-test/CMakeLists.txt
+@@ -25,6 +25,9 @@ else()
+ target_link_libraries(c-index-test
+ PRIVATE
+ libclang
++ )
++ clang_target_link_libraries(c-index-test
++ PRIVATE
+ clangAST
+ clangBasic
+ clangCodeGen
+--
+2.27.0
+