[llvm-dev] A libc in LLVM

Siva Chandra via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 27 22:29:21 PDT 2019


On Thu, Jun 27, 2019 at 5:19 PM JF Bastien <jfbastien at apple.com> wrote:
> On Jun 27, 2019, at 5:05 PM, Siva Chandra <sivachandra at google.com> wrote:
> On Wed, Jun 26, 2019 at 10:27 AM JF Bastien <jfbastien at apple.com> wrote:
>
> 3. If there is a specification, we should follow it. The scope that we need includes most of the C Standard Library; POSIX additions; and some necessary, system-specific extensions. This does not mean we should (or can) follow the entire specification -- there will be some parts which simply aren't worth implementing, and some parts which cannot be safely used in modern coding practice.
>
>
> I’d love to hear what you have in mind with point 3 above, and see it expanded. libc++ implements C++11 and subsequent standards, and that makes me wonder:
>
> Which standards would this libc implement?
>
>
> We need parts of the C standard library, parts of the POSIX
> extensions, and also the linux headers. The community is of course
> free to widen the surface as needed.
>
>
> Which standard specifically? So far the responses sound like “the standard Google uses”.

I was of the opinion that you were asking me to elaborate point #3 of
mine from above.

> I don’t think that's a good objective for such a project. For practical purposes that’s the implementation approach that makes sense to start with, but I’m looking for what the charter of this LLVM project should be.

I want to refrain from talking as if this libc project has already
been accepted by the LLVM. But yes, if this libc project is indeed
accepted and takes off, we will definitely want a charter written down
for this as an LLVM project. And I also agree that this charter cannot
limit itself to Google's use cases.

> Compare with libc++: https://libcxx.llvm.org

Yes. Our aspirations for this libc are to be like libc++.

> I think you want to fill out a proposed set of documentation pages, like libc++’s, and answer the questions libc++ answers. Not where you’ll start or in what order (though that’s useful for this discussion!), but what your proposed libc aspires to be.

Absolutely!

> Same as above, IMO an LLVM project should aspire to something bigger, even if practical concerns guide the initial implementation.

Again, I want to wait for some sort of confirmation that we can
actually start work on this as an LLVM project.

> Personally I’m really interested in a project that increases the quality of all C libraries, and of the C standard. I therefore think champions of this project signing up to collaborate with WG14 is important.

I do not disagree. At the same time, I am of the opinion that such a
champion should grow out of this project rather than getting
volunteered or nominated. This is my personal opinion and I am ready
to be corrected.

> I think you need write a design for how this C library will be tested.

I can assure you that all this will happen once we take off.

> I suggest you have a chat with Marshall Clow (CC’ed). He does a lot of really good work with libc++ and the C++ Standards Committee. I’d like this C library to be similar to libc++ in many ways, and I’d like a leader like Marshall involved in leading this C library. Talking to Marshall will help understand the type of leadership I’d like to see in this project.

Experienced guidance is most welcome. And, thanks a lot for bringing
up everything you have done in this email. I also apologize for the
delay in my response, so thanks for your patience as well.


More information about the llvm-dev mailing list