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

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 29 07:11:35 PDT 2025


arsenm wrote:

> HIP does not only not need the C device runtime, 

It does. The language bakes in the assumption that all of the libc and libm calls exist in the ambient environment. A header file wrapper is not sufficient (e.g. we need workarounds like 77de8a0c0abc9d245a7c6278670554b47ae183ea), and various other builtins also fail. 

> I think languages should opt in to the libraries they need not opt out.

There are language libraries, and system support libraries. This falls more under system support libraries that should be universally available; the question is then whether it should require explicit -lc and -lm like some toolchains do or not. I have a longer writeup about all of the issues with how we're linking everything I need to finish 

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


More information about the cfe-commits mailing list