[PATCH] D147581: [libc] Ensure that the `clang-offload-packager` is up-to-date for libc GPU

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 16:21:18 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: tra, jdoerfert, sivachandra, michaelrj, lntue.
Herald added subscribers: ecnelises, tschuett.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The `clang-offload-packager` tool is required for building the GPU
target of `libc`. This patch ensures that we build this tool when
directly building `libc` via `ninja libc` or similar.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147581

Files:
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -399,6 +399,9 @@
       # "libc" is detected in LLVM_ENABLE_RUNTIMES.
       message(FATAL_ERROR "libc-hdrgen target missing unexpectedly")
     endif()
+    if(LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES)
+      list(APPEND extra_deps clang-offload-packager)
+    endif()
   endif()
   if(NOT LLVM_RUNTIME_TARGETS)
     runtime_default_target(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147581.510959.patch
Type: text/x-patch
Size: 515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230404/45fe4201/attachment.bin>


More information about the llvm-commits mailing list