4 ms·
This project is dead in the water if the resulting libc depends on libc++ at runtime.
by AndyKelley 5y ago
This project is dead in the water if the resulting libc depends on libc++ at runtime.
- silverlyra 5y agoI wondered if that’s why the proposal words it as “use C++ language facilities” instead of just “use C++” – use the C++ language, but not its stdlib. I found this internal file that forms the basis of all the atoi and strol family functions. Seems like they do get some nice wins from the C++ language, without needing (e.g.) STL: https://github.com/llvm/llvm-project/blob/main/libc/src/__support/str_to_integer.h https://github.com/llvm/llvm-project/blob/main/libc/src/__su...
- deleted 5y ago[deleted]
- pjmlp 5y agoMany others have already trailed this path like e.g. Microsoft in 2014.
- SubjectToChange 5y agoSystems like game consoles or Fuchsia only need a libc for POSIX compatibility, this would work well for them.
- scrb 5y agoAs somebody else has already said, the idea is to use the c++ language and not its runtime or the standard library. In fact, there are a few clang-tidy checks for llvm libc to protect from accidentally using pieces from other libraries (like the system libc and the c++ standard library.) https://clang.llvm.org/extra/clang-tidy/checks/llvmlibc-callee-namespace.html https://clang.llvm.org/extra/clang-tidy/checks/llvmlibc-call... https://clang.llvm.org/extra/clang-tidy/checks/llvmlibc-implementation-in-namespace.html https://clang.llvm.org/extra/clang-tidy/checks/llvmlibc-impl... https://clang.llvm.org/extra/clang-tidy/checks/llvmlibc-restrict-system-libc-headers.html https://clang.llvm.org/extra/clang-tidy/checks/llvmlibc-rest...