Skip to content

Commit

Permalink
Fix lld libraries cmake export (#10)
Browse files Browse the repository at this point in the history
* try fixing lld library cmake exports

* try exporting lldWasm

* lld cmake export fix

Co-authored-by: Marc-André Moreau <[email protected]>
  • Loading branch information
awakecoding and Marc-André Moreau authored Sep 13, 2021
1 parent 7a0362d commit 1c87908
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions cmake/llvm-distribution.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@ set(LLVM_TOOLCHAIN_TOOLS
${LLVM_BINUTILS_COMPONENTS}
CACHE STRING "")

set(LLD_EXPORTED_TARGETS
lldCommon
lldCore
lldDriver
lldMachO
lldYAML
lldReaderWriter
lldCOFF
lldELF
lldMachO2
lldMinGW
lldWasm)

set(LLVM_DEVELOPMENT_COMPONENTS
cmake-exports
llvm-headers
Expand All @@ -123,6 +136,7 @@ set(LLVM_DEVELOPMENT_COMPONENTS
libclang-headers
lld-headers # requires patch
lld-libraries # requires patch
${LLD_EXPORTED_TARGETS} # cmake export fix
lld-cmake-exports
CACHE STRING "")

Expand Down
6 changes: 3 additions & 3 deletions patches/0001-add-lld-install-targets.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 2b6f6d9199b1a7ce9e9034df3909cddd8bcde6d0 Mon Sep 17 00:00:00 2001
From ef2e03b4ce1244c71fd6fdf918285c948d32a54c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= <[email protected]>
Date: Wed, 8 Sep 2021 08:49:13 -0400
Subject: [PATCH] add lld install targets
Expand All @@ -9,7 +9,7 @@ Subject: [PATCH] add lld install targets
2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 2e99564f4..5bb3d9ec0 100644
index 2e99564f4..9f72266b3 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -189,9 +189,19 @@ include_directories(BEFORE
Expand All @@ -23,7 +23,7 @@ index 2e99564f4..5bb3d9ec0 100644
+
+ add_custom_target(lld-headers)
+ set_target_properties(lld-headers PROPERTIES FOLDER "Misc")
+
+
+ if(NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets(install-lld-headers
+ DEPENDS lld-headers
Expand Down

0 comments on commit 1c87908

Please sign in to comment.