[clang] [HIP] Use linker wrapper for device-only code object links (PR #211675)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 14 08:35:01 PDT 2026


https://github.com/jhuber6 commented:

I am still not exactly sure why this is necessary and the amount of complexity pushed into the driver is giving me pause, do you have a concrete reproducer I can look at? As far as I can tell this might just be a consequence of HIP having two incompatible ways of linking libraries.

To my knowledge, the new driver defers to the linker wrapper, which should just handle `-lclang_rt.profile` implicitly. So, as long as everything goes through the standard linker handling and `lld` it should work? Is this fundamentally just becaues the `--offload-device-only` does not use the 'proper' linker? Couldn't we just make the `--offload-device-only` case use the same linker job that `--target-amdgpu-amd-amdhsa` uses like the linker wrapper does internally?

https://github.com/llvm/llvm-project/pull/211675


More information about the cfe-commits mailing list