[lld] [lld] enable installing lld headers as part of distribution (PR #127123)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 13 12:47:22 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld
Author: Maksim Levental (makslevental)
<details>
<summary>Changes</summary>
Currently if one does
```
set(LLVM_DISTRIBUTION_COMPONENTS
lld
lld-cmake-exports)
```
and then `ninja install-distribution` one does not get an `dist/include/lld` folder.
This PR fixes that.
---
Full diff: https://github.com/llvm/llvm-project/pull/127123.diff
1 Files Affected:
- (modified) lld/CMakeLists.txt (+10-1)
``````````diff
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 64c9f23805509..7beea1e15296e 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -180,12 +180,21 @@ include_directories(BEFORE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
+add_custom_target(lld-headers)
+set_target_properties(lld-headers PROPERTIES FOLDER "Misc")
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
- install(DIRECTORY include/
+ install(DIRECTORY include/lld
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+ COMPONENT lld-headers
FILES_MATCHING
PATTERN "*.h"
)
+
+ if (NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets(install-lld-headers
+ DEPENDS lld-headers
+ COMPONENT lld-headers)
+ endif()
endif()
add_subdirectory(Common)
``````````
</details>
https://github.com/llvm/llvm-project/pull/127123
More information about the llvm-commits
mailing list