[clang] [llvm] Call setup_host_tools for more tools. (PR #118635)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 05:43:03 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Harald van Dijk (hvdijk)
<details>
<summary>Changes</summary>
This change allows external projects to call for host versions of clang-offload-bundler, clang-offload-packager, and llvm-ar.
This has no effect in LLVM itself, which does not make use of this, but is going to be used in DPC++'s libsycl. That is meant to be upstreamed at some point, so it probably makes sense to get this into LLVM already and avoid future conflicts.
---
Full diff: https://github.com/llvm/llvm-project/pull/118635.diff
3 Files Affected:
- (modified) clang/tools/clang-offload-bundler/CMakeLists.txt (+3)
- (modified) clang/tools/clang-offload-packager/CMakeLists.txt (+3)
- (modified) llvm/tools/llvm-ar/CMakeLists.txt (+2)
``````````diff
diff --git a/clang/tools/clang-offload-bundler/CMakeLists.txt b/clang/tools/clang-offload-bundler/CMakeLists.txt
index dec2881589a538..5b26951b96f5db 100644
--- a/clang/tools/clang-offload-bundler/CMakeLists.txt
+++ b/clang/tools/clang-offload-bundler/CMakeLists.txt
@@ -12,6 +12,9 @@ add_clang_tool(clang-offload-bundler
intrinsics_gen
)
+setup_host_tool(clang-offload-bundler CLANG_OFFLOAD_BUNDLER
+ clang-offload-bundler_exe clang-offload-bundler_target)
+
set(CLANG_OFFLOAD_BUNDLER_LIB_DEPS
clangBasic
clangDriver
diff --git a/clang/tools/clang-offload-packager/CMakeLists.txt b/clang/tools/clang-offload-packager/CMakeLists.txt
index 1c29e376452c12..ba446e18bd326b 100644
--- a/clang/tools/clang-offload-packager/CMakeLists.txt
+++ b/clang/tools/clang-offload-packager/CMakeLists.txt
@@ -11,6 +11,9 @@ add_clang_tool(clang-offload-packager
${tablegen_deps}
)
+setup_host_tool(clang-offload-packager CLANG_OFFLOAD_PACKAGER_EXE
+ clang-offload-packager_exe clang-offload-packager_target)
+
clang_target_link_libraries(clang-offload-packager
PRIVATE
clangBasic
diff --git a/llvm/tools/llvm-ar/CMakeLists.txt b/llvm/tools/llvm-ar/CMakeLists.txt
index 4d0718f8cefe62..30e2507c6e6f25 100644
--- a/llvm/tools/llvm-ar/CMakeLists.txt
+++ b/llvm/tools/llvm-ar/CMakeLists.txt
@@ -19,6 +19,8 @@ add_llvm_tool(llvm-ar
GENERATE_DRIVER
)
+setup_host_tool(llvm-ar LLVM_AR llvm_ar_exe llvm_ar_target)
+
add_llvm_tool_symlink(llvm-ranlib llvm-ar)
add_llvm_tool_symlink(llvm-lib llvm-ar)
add_llvm_tool_symlink(llvm-dlltool llvm-ar)
``````````
</details>
https://github.com/llvm/llvm-project/pull/118635
More information about the cfe-commits
mailing list