[PATCH] D64939: Add a proposal for a libc project under the LLVM umbrella.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 23:06:37 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/docs/Proposals/LLVMLibC.rst:24
+- C17 and upwards conformant.
+- A modular libc with individual pieces implemented in the "as a
+  library" philosophy of the LLVM project.
----------------
> "as a library" philosophy of the LLVM project.

This is not clear. See Szabolcs's concern in https://lists.llvm.org/pipermail/llvm-dev/2019-July/133894.html

It is a very good reply but many questions in that post have not been answered.


================
Comment at: llvm/docs/Proposals/LLVMLibC.rst:29
+- Provide C symbols as specified by the standards, but take advantage
+  and use C++ language facilities for the core implementation.
+- Provides POSIX extensions on POSIX compliant platforms.
----------------
Can you clarify a bit what features you really want from C++?

People have concerns that freestanding c++ language semantics are underspecified. My impression is that it may be useful in a few places, but in most places C will just be a better choice.


================
Comment at: llvm/docs/Proposals/LLVMLibC.rst:36
+  testing like fuzz testing and sanitizer-supported testing.
+- ABI independent implementation as far as possible.
+- Use source based implementations as far possible rather than
----------------
What "ABI" means here is very unclear (call ABI? ELF processor-supplements ABI? ABI specified by the host libc?). Does "ABI independent" mean inventing your own ABI?


================
Comment at: llvm/docs/Proposals/LLVMLibC.rst:55
+
+- Most libc implementations are monolithic. It is a non-trivial
+  porting task to pick and choose only the pieces relevant to one's
----------------
I don't know why you call them monolithic. Many libc implementations, if they care static linking, just can't be monolithic. In static linking, you link in just enough components of libc, otherwise your program will be monstrous.

uclibc is menuconfig configurable
most components of musl libc.a are optional
glibc can be separated into libc libpthread librt libcrypt ...


================
Comment at: llvm/docs/Proposals/LLVMLibC.rst:59
+  make picking and choosing a straightforward task.
+- Most libc implementations break when built with sanitizer specific
+  compiler options. The llvm-libc will be developed from the start to
----------------
> Most libc implementations break

"break" is not accurate. They just lack builtin sanitizer interceptors.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64939/new/

https://reviews.llvm.org/D64939





More information about the llvm-commits mailing list