[clang] [HIP] Support device-only linking of bitcode offload binaries (PR #212342)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 13:46:51 PDT 2026
================
@@ -0,0 +1,53 @@
+// REQUIRES: amdgpu-registered-target
+// REQUIRES: lld
+
+// RUN: %clang --target=amdgcn-amd-amdhsa -emit-llvm -c -nogpulib -DVAR=x %s -o %t.x.bc
+// RUN: %clang --target=amdgcn-amd-amdhsa -emit-llvm -c -nogpulib -DVAR=y %s -o %t.y.bc
+// RUN: llvm-offload-binary -o %t.x.bundle.bc \
+// RUN: --image=file=%t.x.bc,triple=amdgcn-amd-amdhsa,arch=gfx906,kind=hip \
+// RUN: --image=file=%t.x.bc,triple=amdgcn-amd-amdhsa,arch=gfx942,kind=hip
+// RUN: llvm-offload-binary -o %t.y.bundle.bc \
----------------
jhuber6 wrote:
This is a little confusing, it's called `.bc` but it's not LLVM-IR, it has different magic bytes.
https://github.com/llvm/llvm-project/pull/212342
More information about the cfe-commits
mailing list