Is LLVM libc good enough for desktop usage?
What would it take to get llvm libc to work on macos like it does on linux? and is there interest to make it happen? - C - LLVM Discussion Forums
A proposal to start “llvm-libc” (2020)
printf - What standard C library does Clang use? glibc, its own, or some other one? - Stack Overflow
Videos
Hi, currently I build libcxx and statically link it for all desktop platforms, this ensures that I have the same cxx features everywhere.
I would like to have that with llvm-libc too, basically build llvm-libc then build llvm-libcxx on top of it to have the same consistency for C. Because at least %60 percent of libraries I use are C libraries.
Clang does not come with its own C standard library. Rather, it "supports a wide variety of C standard library implementations".
Unix-like systems including Mac OS ship with their own. Windows does not. On Windows the default arrangement requires Microsoft's Visual C libraries to be installed. It seems that it's also possible to use Clang on Windows with MinGW's libraries though.
Things are changing! - LLVM is working on its own libc implementation https://github.com/llvm/llvm-project/tree/main/libc
They haven't talked about it in a couple of versions: https://releases.llvm.org/12.0.0/docs/Proposals/LLVMLibC.html
llvm-libc, [is] an implementation of the C standard library targeting C17 and above, as part of the LLVM project. llvm-libc will also provide platform specific extensions as relevant. For example, on Linux it also provides pthreads, librt and other POSIX extension libraries.
Parts I find most interesting are:
Designed and developed from the start to work with LLVM tooling and testing like 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.
Looks like LLVM 14 or 15 will be released with it. Watch this space for further documentation!