[libc-commits] [PATCH] D127174: Replace Goals and Why section with Introduction
Jeff Bailey via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jun 6 23:53:58 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGef3db4fcab4a: Replace Goals and Why section with Introduction (authored by jeffbailey).
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
@@ -1,6 +1,6 @@
-llvm-libc: An ISO C-conformant Standard Library for LLVM
+llvm-libc: An ISO C-conformant Standard Library
**llvm-libc library is not complete. If you need a fully functioning libc right
now, you should continue to use your standard system libc.**
@@ -9,45 +9,26 @@
-- C17 and upwards conformant.
-- A modular libc with individual pieces implemented in the "as a
- library" philosophy of the LLVM project.
-- Ability to layer this libc over the system libc if possible and desired
- for a platform.
-- Provide POSIX extensions on POSIX compliant platforms.
-- Provide system-specific extensions as appropriate. For example,
- provide the Linux API on Linux.
-- Designed and developed from the start to work with LLVM tooling, fuzz testing
- and sanitizer-supported testing.
-- Use source based implementations as far possible rather than
- assembly. Will try to *fix* the compiler rather than use assembly
- language workarounds.
-- Extensive unit testing and standards conformance testing.
+The libc aspires to a unique place in the software ecosystem. The goals are:
-Why a new C Standard Library?
-Implementing a libc is no small task and is not be taken lightly. A
-natural question to ask is, "why a new implementation of the C
-standard library?" Some of the major reasons are as follows:
-- Rather than being built as a single monolithic codebase, llvm-libc is designed
- from the beginning to enable picking and choosing pieces. This allows using
- it as a minimum overlay for e.g. faster math functions than might be
- available on the system library. This is useful where an application may
- need to access improved CPU support over what's available on the system,
- or may need guarantees in performance across different installs.
-- Explicit support for building llvm-libc and code with sanitizer compiler
+- 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
-- Be useful for research and review. By avoiding assembly language, using C++
- iterators, RAII and templates, llvm-libc aims to have clearly
- readable code and to improve the compiler as needed to ensure that optimal
- assembly is emitted.
-- Enable fully static compiles.
.. __: https://github.com/llvm/llvm-project/tree/main/libc/fuzzing
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3601 bytes
Desc: not available
More information about the libc-commits