[clang] [Docs] Document freestanding requirements (PR #132232)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 21 10:16:19 PDT 2025


AaronBallman wrote:

> But, what I would like is that we somehow make it trivial for users to get an implementation of the required functionality without requiring an externally-provided libc. Some way for users to trivially build and link against implementations of those functions for their minimal target, without depending on anything else.

I had originally thought that was the direction we would go (effectively, Clang-supplied headers would start to provide `<string.h>` and `<stdbit.h>` with implementations for the functionality). However, the consensus position at the time was that we expect the *user* to link against whatever C standard library they want, and that library has to supply those symbols. In effect, Clang would only be responsible for providing macros and typedefs that only the compiler can provide.

So I was trying to document that expectation.

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


More information about the cfe-commits mailing list