diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2025-03-27 13:17:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-27 13:17:05 -0400 |
commit | 85c54a519fa6856b3e9a462445633ed4535eafa4 (patch) | |
tree | c8e0c30ae69fbe9d5ebeccea53b697beefd33613 /clang/docs/CommandGuide | |
parent | 82c078c54d16b20c65d5e361f5da58b0b83c8c47 (diff) | |
download | llvm-85c54a519fa6856b3e9a462445633ed4535eafa4.zip llvm-85c54a519fa6856b3e9a462445633ed4535eafa4.tar.gz llvm-85c54a519fa6856b3e9a462445633ed4535eafa4.tar.bz2 |
[Docs] Document freestanding requirements (#132232)
This adds some initial documentation about freestanding requirements for
Clang. The most critical part of the documentation is spelling out that
a conforming freestanding C Standard Library is required; Clang will not
be providing the headers for <string.h> in C23 which expose a number of
symbols in freestanding mode.
The docs also make it clear that in addition to a conforming
freestanding C standard library, the library must provide some
additional symbols which LLVM requires.
These docs are not comprehensive, this is just getting the bare bones in
place so that they can be expanded later.
This also updates the C status page to make it clear that we don't have
anything to do for WG14 N2524 which adds string interfaces to
freestanding mode.
Diffstat (limited to 'clang/docs/CommandGuide')
-rw-r--r-- | clang/docs/CommandGuide/clang.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst index f0d94a4..42aac7b 100644 --- a/clang/docs/CommandGuide/clang.rst +++ b/clang/docs/CommandGuide/clang.rst @@ -262,9 +262,10 @@ Language Selection and Mode Options .. option:: -ffreestanding Indicate that the file should be compiled for a freestanding, not a hosted, - environment. Note that it is assumed that a freestanding environment will - additionally provide `memcpy`, `memmove`, `memset` and `memcmp` - implementations, as these are needed for efficient codegen for many programs. + environment. Note that a freestanding build still requires linking against a C + Standard Library which supports the freestanding interfaces for the specified + language mode and target environment. This includes functions like `memcpy`, + `memmove`, and `memset`. .. option:: -fno-builtin |