2022-06-07 06:52:02 +00:00
|
|
|
===============================================
|
|
|
|
llvm-libc: An ISO C-conformant Standard Library
|
|
|
|
===============================================
|
2022-02-16 03:45:57 +00:00
|
|
|
|
|
|
|
**llvm-libc library is not complete. If you need a fully functioning libc right
|
|
|
|
now, you should continue to use your standard system libc.**
|
2019-08-15 15:50:42 +00:00
|
|
|
|
|
|
|
.. contents:: Table of Contents
|
|
|
|
:depth: 4
|
|
|
|
:local:
|
|
|
|
|
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
|
|
|
|
functions in llvm-libc have been tested on Windows. The Fuchsia platform is
|
|
|
|
slowly replacing functions from its bundled libc with functions from llvm-libc.
|
2019-08-15 15:50:42 +00:00
|
|
|
|
|
|
|
ABI Compatibility
|
|
|
|
=================
|
|
|
|
|
2022-02-16 03:45:57 +00:00
|
|
|
llvm-libc is written to be ABI independent. Interfaces are generated using
|
|
|
|
LLVM's tablegen, so supporting arbitrary ABIs is possible. In it's initial
|
|
|
|
stages llvm-libc is not offering ABI stability in any form.
|
2019-08-15 15:50:42 +00:00
|
|
|
|
2022-01-29 00:27:34 +00:00
|
|
|
Other Interesting Documentation
|
|
|
|
===============================
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
|
|
|
|
build_system
|
|
|
|
clang_tidy_checks
|
|
|
|
entrypoints
|
|
|
|
fuzzing
|
|
|
|
ground_truth_specification
|
|
|
|
header_generation
|
|
|
|
implementation_standard
|
2022-03-22 23:42:01 +00:00
|
|
|
api_test
|
2022-02-16 03:45:57 +00:00
|
|
|
layering
|
2022-01-29 00:27:34 +00:00
|
|
|
mechanics_of_public_api
|
|
|
|
redirectors
|
|
|
|
source_layout
|
2022-04-12 16:20:55 -07:00
|
|
|
strings
|
2022-04-14 06:52:23 +00:00
|
|
|
runtimes_build
|
2022-04-14 14:32:16 -07:00
|
|
|
stdio
|
2022-06-15 19:57:46 -04:00
|
|
|
math
|