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

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 18:34:24 PDT 2018


chandlerc added a comment.

In addition to what Eric said, I just want to pull back up an old comment here:

In https://reviews.llvm.org/D28791#648932, @beanz wrote:

> @joerg I completely disagree with you. Since libgcc provides those files for some platforms compiler-rt should as well.
>
> I believe that one of the project goals of compiler-rt is to allow Clang + Compiler-RT to replace GCC + libGCC. We can't do that without these object files being produced, so I believe this complexity is necessary and justified.


Regardless of what happens for Fuschia, we have a real platform (Linux) with a libc that does *not* provide these bits and which expects the compiler to provide these bits. I would like LLVM to be an effective toolchain on that platform and provide the missing pieces here. Changing libc in this case isn't realistic -- these are existing platforms that may not be updating their libc.

If Fuschia wants to follow a similar design pattern (putting the CRT bits into the toolchain rather than the libc) I have no particular opinion on that being the "right" or "wrong" design. But it doesn't seem to be much of a burden on LLVM (if a burden at all) given that I think we will have to provide these components to support Linux without relying on libgcc.


Repository:
  rL LLVM

https://reviews.llvm.org/D28791





More information about the llvm-commits mailing list