[libc-commits] [libc] ef3db4f - Replace Goals and Why section with Introduction
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Mon Jun 6 23:53:58 PDT 2022
Author: Jeff Bailey
Date: 2022-06-07T06:53:54Z
New Revision: ef3db4fcab4a32cd8efff86b417b459d4d4fc1d5
URL: https://github.com/llvm/llvm-project/commit/ef3db4fcab4a32cd8efff86b417b459d4d4fc1d5
DIFF: https://github.com/llvm/llvm-project/commit/ef3db4fcab4a32cd8efff86b417b459d4d4fc1d5.diff
LOG: Replace Goals and Why section with Introduction
Rewrite the introduction of the page to state clearly the goals of
LLVM's libc project.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D127174
Added:
Modified:
libc/docs/index.rst
Removed:
################################################################################
diff --git a/libc/docs/index.rst b/libc/docs/index.rst
index 835e2fb17e0b9..81e546bbf825f 100644
--- a/libc/docs/index.rst
+++ b/libc/docs/index.rst
@@ -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 @@ now, you should continue to use your standard system libc.**
:depth: 4
:local:
-Goals
-=====
+Introduction
+============
-- 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
diff erent installs.
-- Explicit support for building llvm-libc and code with sanitizer compiler
- options.
+- 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.
- `Fuzzing`__
-- 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
More information about the libc-commits
mailing list