2022-08-05 06:24:43 +00:00
|
|
|
==================
|
|
|
|
The LLVM C Library
|
|
|
|
==================
|
2022-02-16 03:45:57 +00:00
|
|
|
|
2022-08-05 06:24:43 +00:00
|
|
|
.. warning::
|
|
|
|
The libc is not complete. If you need a fully functioning C library right
|
|
|
|
now, you should continue to use your standard system libraries.
|
2019-08-15 15:50:42 +00:00
|
|
|
|
2022-06-07 06:52:02 +00:00
|
|
|
Introduction
|
|
|
|
============
|
2019-08-15 15:50:42 +00:00
|
|
|
|
2022-06-07 06:52:02 +00:00
|
|
|
The libc aspires to a unique place in the software ecosystem. The goals are:
|
2019-08-15 15:50:42 +00:00
|
|
|
|
2022-06-07 06:52:02 +00:00
|
|
|
- Fully compliant with current C standards (C17 and upcoming C2x) and POSIX.
|
|
|
|
- Easily decomposed and embedded: Supplement or replace system C library
|
|
|
|
functionality easily. This is useful to get consistent math precision across
|
|
|
|
systems, or updated memory operations for newer microarchitectures. These
|
|
|
|
pieces will work on Linux, MacOS, Windows, and Fuchsia.
|
|
|
|
- The creation of fully static binaries without license implications.
|
|
|
|
- Increase whole program optimization opportunities for static binaries through
|
|
|
|
ability to inline math and memory operations.
|
|
|
|
- Reduce coding errors by coding in modern C++ through the use of lightweight
|
|
|
|
containers during coding that can be optimized away at runtime.
|
|
|
|
- Permit fuzzing and sanitizer instrumentation of user binaries including the
|
|
|
|
libc functions.
|
|
|
|
- A complete testsuite that tests both the public interface and internal
|
|
|
|
algorithms.
|
2022-02-16 03:45:57 +00:00
|
|
|
- `Fuzzing`__
|
|
|
|
|
|
|
|
.. __: https://github.com/llvm/llvm-project/tree/main/libc/fuzzing
|
2019-08-15 15:50:42 +00:00
|
|
|
|
|
|
|
Platform Support
|
|
|
|
================
|
|
|
|
|
2022-02-16 03:45:57 +00:00
|
|
|
Most development is currently targeting x86_64 and aarch64 on Linux. Several
|
2022-08-05 06:24:43 +00:00
|
|
|
functions in the libc have been tested on Windows. The Fuchsia platform is
|
|
|
|
slowly replacing functions from its bundled libc with functions from this
|
|
|
|
project.
|
2019-08-15 15:50:42 +00:00
|
|
|
|
|
|
|
ABI Compatibility
|
|
|
|
=================
|
|
|
|
|
2022-08-05 06:24:43 +00:00
|
|
|
The libc is written to be ABI independent. Interfaces are generated using
|
2022-02-16 03:45:57 +00:00
|
|
|
LLVM's tablegen, so supporting arbitrary ABIs is possible. In it's initial
|
2022-08-05 06:24:43 +00:00
|
|
|
stages there is no ABI stability in any form.
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
2023-01-05 01:09:28 -08:00
|
|
|
:maxdepth: 2
|
2022-08-06 05:30:08 +00:00
|
|
|
:caption: Using
|
|
|
|
|
2022-10-26 17:22:20 -07:00
|
|
|
usage_modes
|
|
|
|
overlay_mode
|
|
|
|
fullbuild_mode
|
2023-04-25 16:23:07 -05:00
|
|
|
gpu/index.rst
|
2022-08-06 05:30:08 +00:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
|
|
|
:maxdepth: 1
|
|
|
|
:caption: Status
|
|
|
|
|
2023-03-14 22:52:53 -07:00
|
|
|
compiler_support
|
2022-10-08 00:03:47 +00:00
|
|
|
date_and_time
|
2023-02-14 12:36:07 -05:00
|
|
|
math/index.rst
|
2022-08-06 05:30:08 +00:00
|
|
|
strings
|
|
|
|
stdio
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
|
|
|
:maxdepth: 1
|
|
|
|
:caption: Development
|
2019-08-15 15:50:42 +00:00
|
|
|
|
2022-11-05 00:58:16 -07:00
|
|
|
build_and_test
|
2023-03-02 10:58:04 -08:00
|
|
|
dev/index.rst
|
2022-10-28 00:12:08 -07:00
|
|
|
porting
|
2022-10-28 01:09:38 -07:00
|
|
|
contributing
|
2022-01-29 00:27:34 +00:00
|
|
|
|
|
|
|
.. toctree::
|
2022-08-05 06:24:43 +00:00
|
|
|
:hidden:
|
|
|
|
:maxdepth: 1
|
|
|
|
:caption: External Links
|
2022-01-29 00:27:34 +00:00
|
|
|
|
2022-08-05 06:24:43 +00:00
|
|
|
Source Code <https://github.com/llvm/llvm-project/tree/main/libc>
|
2022-08-06 05:30:08 +00:00
|
|
|
Bug Reports <https://github.com/llvm/llvm-project/labels/libc>
|
2022-11-02 00:34:11 -07:00
|
|
|
Discourse <https://discourse.llvm.org/c/runtimes/libc>
|
2023-03-03 16:06:29 -08:00
|
|
|
Join the Discord <https://discord.gg/xS7Z362>
|
2022-11-02 00:34:11 -07:00
|
|
|
Discord Channel <https://discord.com/channels/636084430946959380/636732994891284500>
|
2022-09-02 06:44:08 +00:00
|
|
|
Buildbot <https://lab.llvm.org/buildbot/#/builders?tags=libc>
|