Skip to content

Commit 1c87908

Browse files
awakecodingMarc-André Moreau
andauthored
Fix lld libraries cmake export (#10)
* try fixing lld library cmake exports * try exporting lldWasm * lld cmake export fix Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
1 parent 7a0362d commit 1c87908

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

cmake/llvm-distribution.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,19 @@ set(LLVM_TOOLCHAIN_TOOLS
112112
${LLVM_BINUTILS_COMPONENTS}
113113
CACHE STRING "")
114114

115+
set(LLD_EXPORTED_TARGETS
116+
lldCommon
117+
lldCore
118+
lldDriver
119+
lldMachO
120+
lldYAML
121+
lldReaderWriter
122+
lldCOFF
123+
lldELF
124+
lldMachO2
125+
lldMinGW
126+
lldWasm)
127+
115128
set(LLVM_DEVELOPMENT_COMPONENTS
116129
cmake-exports
117130
llvm-headers
@@ -123,6 +136,7 @@ set(LLVM_DEVELOPMENT_COMPONENTS
123136
libclang-headers
124137
lld-headers # requires patch
125138
lld-libraries # requires patch
139+
${LLD_EXPORTED_TARGETS} # cmake export fix
126140
lld-cmake-exports
127141
CACHE STRING "")
128142

patches/0001-add-lld-install-targets.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 2b6f6d9199b1a7ce9e9034df3909cddd8bcde6d0 Mon Sep 17 00:00:00 2001
1+
From ef2e03b4ce1244c71fd6fdf918285c948d32a54c Mon Sep 17 00:00:00 2001
22
From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= <mamoreau@devolutions.net>
33
Date: Wed, 8 Sep 2021 08:49:13 -0400
44
Subject: [PATCH] add lld install targets
@@ -9,7 +9,7 @@ Subject: [PATCH] add lld install targets
99
2 files changed, 33 insertions(+), 1 deletion(-)
1010

1111
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
12-
index 2e99564f4..5bb3d9ec0 100644
12+
index 2e99564f4..9f72266b3 100644
1313
--- a/lld/CMakeLists.txt
1414
+++ b/lld/CMakeLists.txt
1515
@@ -189,9 +189,19 @@ include_directories(BEFORE
@@ -23,7 +23,7 @@ index 2e99564f4..5bb3d9ec0 100644
2323
+
2424
+ add_custom_target(lld-headers)
2525
+ set_target_properties(lld-headers PROPERTIES FOLDER "Misc")
26-
+
26+
+
2727
+ if(NOT LLVM_ENABLE_IDE)
2828
+ add_llvm_install_targets(install-lld-headers
2929
+ DEPENDS lld-headers

0 commit comments

Comments
 (0)