[libc-dev] Platform and architecture abstraction layers

David Chisnall via libc-dev libc-dev at lists.llvm.org
Tue Mar 31 07:42:12 PDT 2020


Hello libc people,

When llvm-libc was approved for incorporation into LLVM, the stated goal 
was to provide a portable libc implementation.  I'm quite concerned that 
we are increasingly seeing a load of Linux-specific code being 
committed.  This is all in a linux directory, which is fine in theory, 
but I don't want us to end up with an entire libc in linux/x86-64/* and 
nothing elsewhere.  It is much easier to build portable software from 
the start than it is to retrofit portability.  We need to start putting 
in platform and architecture abstraction layers from the start.

Most of the code committed in linux/x86_64/start.cpp, is either 
identical or almost identical on all architectures and all System-V ABI 
platforms.  As the code is currently structured, this is going to be 
copied and pasted repeatedly.

David


More information about the libc-dev mailing list