1================== 2The LLVM C Library 3================== 4 5.. note:: 6 LLVM-libc is not fully complete right now. Some programs may fail to build due 7 to missing functions (especially C++ ones). If you would like to help us 8 finish LLVM-libc, check out "Contributing to the libc project" in the sidebar 9 or ask on discord. 10 11Introduction 12============ 13 14LLVM-libc aspires to a unique place in the software ecosystem. The goals are: 15 16- Fully compliant with current C standards (C17 and upcoming C2x) and POSIX. 17- Easily decomposed and embedded: Supplement or replace system C library 18 functionality easily. This is useful to get consistent math precision across 19 systems, or updated memory operations for newer microarchitectures. These 20 pieces will work on Linux, MacOS, Windows, and Fuchsia. 21- The creation of fully static binaries without license implications. 22- Increase whole program optimization opportunities for static binaries through 23 ability to inline math and memory operations. 24- Reduce coding errors by coding in modern C++ through the use of lightweight 25 containers during coding that can be optimized away at runtime. 26- Permit fuzzing and sanitizer instrumentation of user binaries including the 27 libc functions. 28- A complete testsuite that tests both the public interface and internal 29 algorithms. 30- `Fuzzing`__ 31 32.. __: https://github.com/llvm/llvm-project/tree/main/libc/fuzzing 33 34Platform Support 35================ 36 37Most development is currently targeting Linux on x86_64, aarch64, arm, and 38RISC-V. Embedded/baremetal targets are supported on arm and RISC-V, and Windows 39and MacOS have limited support (may be broken). The Fuchsia platform is 40slowly replacing functions from its bundled libc with functions from this 41project. 42 43ABI Compatibility 44================= 45 46The libc is written to be ABI independent. Interfaces are generated using 47headergen, so supporting arbitrary ABIs is possible. In it's initial 48stages there is no ABI stability in any form. 49 50.. toctree:: 51 :hidden: 52 :maxdepth: 2 53 :caption: Using 54 55 usage_modes 56 overlay_mode 57 fullbuild_mode 58 configure 59 gpu/index.rst 60 61.. toctree:: 62 :hidden: 63 :maxdepth: 1 64 :caption: Status 65 66 compiler_support 67 date_and_time 68 math/index.rst 69 strings 70 stdio 71 stdbit 72 fenv 73 libc_search 74 c23 75 ctype 76 complex 77 signal 78 threads 79 setjmp 80 81.. toctree:: 82 :hidden: 83 :maxdepth: 1 84 :caption: Development 85 86 build_and_test 87 dev/index.rst 88 porting 89 contributing 90 talks 91 92.. toctree:: 93 :hidden: 94 :maxdepth: 1 95 :caption: External Links 96 97 Source Code <https://github.com/llvm/llvm-project/tree/main/libc> 98 Bug Reports <https://github.com/llvm/llvm-project/labels/libc> 99 Discourse <https://discourse.llvm.org/c/runtimes/libc> 100 Join the Discord <https://discord.gg/xS7Z362> 101 Discord Channel <https://discord.com/channels/636084430946959380/636732994891284500> 102 Buildbot <https://lab.llvm.org/buildbot/#/builders?tags=libc> 103