[llvm-dev] A libc in LLVM

Siva Chandra via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 12 12:37:05 PDT 2019


On Fri, Jul 12, 2019 at 9:15 AM David Greene <dag at cray.com> wrote:
>
> Aaron Ballman via llvm-dev <llvm-dev at lists.llvm.org> writes:
>
> >> * Ability to layer this libc over the system libc.
>
> Echoing others, this seems dubious to me.  Why not build up small pieces
> at a time and write tests for them?  This library doesn't need to
> support all existing programs out of the gate.  I dont't think libc++
> layered on top of existing standard C++ libraries, so why would libc
> need to?

I do not think we are saying we "need to". We are only saying it "has
the ability to". One can choose not to use this ability, but having
this ability might be crucial for adoption for some users.

> >> * Provide C symbols as specified by the standards, but take advantage
> >> and use C++ language facilities for the core implementation.
>
> Does this mean C programs would require a C++ runtime?  If not, how will
> the project ensure that?

This is a very good question. I think, to keep things simple and sane,
llvm-libc should not require a C++ runtime. If this needs some form of
relaxation later, then we can take it up on a case by case basis.

About ensuring that there is no accidental dependence on a C++
runtime, at a very high level, I think suitably configured bots would
suffice? There could be some tooling, but might have to be taken up on
a case by case basis again.


More information about the llvm-dev mailing list