On Fri, Mar 5, 2021 at 1:15 AM Siva Chandra via Phabricator < revi...@reviews.llvm.org> wrote:
> sivachandra added a comment. > > In D97736#2605535 <https://reviews.llvm.org/D97736#2605535>, @phosek > wrote: > > > Have you considered using an input linker script? We could generate > `libc.so` that could look something like: > > > > INPUT(libllvmlibc.a /lib/libc.so) > > > > We would need to pass `--sysroot` to the linker for this to work. The > driver could remain completely agnostic of whether you're using LLVM libc > or not. > > Yes, that was also considered. Those downstream users who have the > flexibility to do it that way should be able to do it that way. However, > not all downstream users or normal clang users will have that liberty [1]. > Another point to note is that we will have to do this with all libc > components like `libc.so`, `libm.so` etc. > > [1] I think all of this can be done. For example, we can set all this up > when building a distribution. However, I am not sure this is worth it when > we know this is a transient phase. Soon, when LLVM libc is complete enough, > a more appropriate option would be the one which allows choosing a libc as > Eric pointed out. > To be clear I'm not a fan of a "pick your libc" option as opposed to just naming the compiled llvm libc as perhaps libc.[a,so,etc] similar to other platforms. I think we'd need a good reason to diverge here. -eric
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits