Re:A proposal to start “llvm-libc” (2020)
by jcranmer on Tuesday December 07, 2021 @06:35PM
(#29479572)
Yes, there is progress. But it is very far from anything you might consider complete or arguably even usable--there's no implementation of malloc or basic stdio, for example.
[ Parent
| on HN ]
Re:A proposal to start “llvm-libc” (2020)
by dogleash on Wednesday December 08, 2021 @09:23AM
(#29485015)
Has there been any refinement on a mission statement for it?
If I recall correctly from the mailing list when this was first proposed, someone had a use case for custom libc but extending it to a general purpose libc diminished properties that would distinguish it from (e.g.) musl-libc.
Re:A proposal to start “llvm-libc” (2020)
by cclearwater on Tuesday December 07, 2021 @07:09PM
(#29479863)
Wouldn't they just use Google's tcmalloc?
Re:A proposal to start “llvm-libc” (2020)
by fyrn- on Tuesday December 07, 2021 @07:16PM
(#29479920)
Probably not the ideal pick for an everuone facing library like this, tcmalloc focuses on reducing core thread contention, at the cost of compactness and often debugability. I've not been following the ptoject for some time though, so maybe things have changed. Still a great allocator if those tradoffs are what you want.
Something more like mimalloc would probably be a better general purpose allocator for something like this
Re:A proposal to start “llvm-libc” (2020)
by scrb on Wednesday December 08, 2021 @12:41PM
(#29487828)
Users wanting allocator functions (malloc and friends) from LLVM libc will get the SCUDO allocator. They need to use a special CMake option to include SCUDO when building LLVM libc.
Re:A proposal to start “llvm-libc” (2020)
by dxf on Wednesday December 08, 2021 @12:24PM
(#29487603)
The plan is to use Scudo, which is the allocator that lives in compiler-rt.
Edited to include the link to Scudo: https://github.com/llvm/llvm-project/tree/main/compiler-rt/l...