[llvm-dev] A libc in LLVM

Siva Chandra via llvm-dev llvm-dev at lists.llvm.org
Tue Jun 25 17:00:58 PDT 2019


On Tue, Jun 25, 2019 at 4:32 PM Zachary Turner <zturner at roblox.com> wrote:

> The main concern I have is that Windows is so different from
> everything else that there is a high likelihood of decisions being
> baked in early on that make things very difficult for people to come
> along later and contribute a Windows implementation.  This happened
> with sanitizers for example (lack of support for weak functions on
> Windows), LLDB (posix api calls scattered throughout the codebase),
> and I worry with libc it will be even more difficult to correctly
> design the abstraction because we have to deal with executable file
> format, syscalls, operating system loaders, and various linkage
> models.
>
> The most immediate thing I think we will run into is that you
> mentioned wanting this to take shape as something that sits in between
> system libc and application.  Given that Windows' libc and other
> versions of libc are so different, I expect this to lead to some
> interesting problems.
>
> Can you elaborate more on how you envision this working with llvm libc
> in between application and system libc?
>

A typical application uses a large number of pieces from a libc. But, it is
not practical to have everything implemented and ready in a new libc from
day one. So for that phase, when the new libc is still being built, we want
the unimplemented parts of the new libc to essentially redirect to the
system libc. This brings two benefits:

1. We can build the new libc in a gradual manner.
2. Applications stay operational while gaining the benefits of the new
implementations.

Do you foresee any problems with this approach on Windows?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190625/6494215c/attachment.html>


More information about the llvm-dev mailing list