summaryrefslogtreecommitdiff
blob: 74b569ca4117bf71d7b889f3482bf71847ce864c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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.
---
 clang/tools/c-index-test/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt
index ceef4b08637..d83d1091936 100644
--- a/clang/tools/c-index-test/CMakeLists.txt
+++ b/clang/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