[PATCH] D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 31 19:58:11 PST 2018


chandlerc added a comment.

FWIW, I completely support landing this. I think the opposition is essentially "it would be better to not design a libc in that way" which is certainly a valid opinion, but given the existence of such libc designs widely deployed and widely used, it seems very good to lay groundwork for LLVM to support them.

I also think we should *not* be pointing at GNU or any other project here, and instead simply state that these exist to support using LLVM in conjunction with systems whose libc chooses this particular design pattern.

I don't think LLVM should be in the business of trying to cast some kind of "you should feel bad" judgement on such systems. If someone in the LLVM community wants to develop a libc as part of LLVM (which I would quite like to see), then that is the place to debate libc design decisions, and not anywhere else.

So, that said, does anyone have comments on the code itself? If no one is up to commenting on the code and giving Petr direct feedback there, I'll just LGTM this because I think it is long (looooooong) overdue.

Lastly, to address specific questions here:

In D28791#1343047 <https://reviews.llvm.org/D28791#1343047>, @krytarowski wrote:

> > That's fine, it's just not the state of the world and we should support compiling appropriately.
>
> I don't want to pick a fight, but there can be used exactly same argument to defend pulling libgcc here.


That doesn't make sense to me -- the LLVM project has lots of reasons why it doesn't pull GPL-ed code into its tree.

But yes, we are going to be in the business of being 100% and fully compatible with `libgcc` in order to effectively support platforms based on `libc`s that follow the design pattern of `glibc`, certainly including platforms that use `glibc`. Is that work? Yes. Should the project do it? Absolutely yes. Just like we work hard to be compatible with the `gcc` commandline and other layers of compatibility, we should work to support these platforms well.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D28791/new/

https://reviews.llvm.org/D28791





More information about the llvm-commits mailing list