[clang] [HIP] Link the LLVM libc libraries in no-RDC mode (PR #151046)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 29 07:40:27 PDT 2025


jhuber6 wrote:

I do agree that in general we should strive to move away from `-mlink-builtin-bitcode`. It's realistically only necessary for this no-RDC no-LTO case. We could theoretically do code object linking if we were careful about register usage, but that opens up a can of worms. It would be nice to be able to use the LLVM libcall interface instead of just hitting backend failures for example.

> Furthermore, we have no accepted proposal for an extension to hip to support libc functions.

 We already provide a subset of C library calls in HIP device code, so it's mostly a question of which ones and where. Though, I suppose they're not 'true' C library calls because we rewrite them in headers to some different name.

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


More information about the cfe-commits mailing list