[libc-dev] Cross compiling libc

Siva Chandra via libc-dev libc-dev at lists.llvm.org
Fri Aug 14 14:49:10 PDT 2020


On Wed, Aug 12, 2020 at 12:53 PM Evandro Menezes <evandro.menezes at sifive.com>
wrote:

> Hi, Siva.
>
> On Aug 12, 2020, at 12:35, Siva Chandra <sivachandra at google.com> wrote:
>
> On Tue, Aug 11, 2020 at 12:51 PM Evandro Menezes via libc-dev <
> libc-dev at lists.llvm.org> wrote:
>
>> What are the best practices to cross build LLVM with libc?
>>
>> I'm trying to cross build LLVM with libc and compiler-rt (without
>> sanitizers) and there seem to be cross dependencies between the latter
>> projects.  For example, compiler-rt/lib/builtins/int_util.c includes
>> stdlib.h.
>
>
> LLVM libc is not complete enough to be the only libc for an application
> like LLVM/Clang. But, one should be able to statically link to the items
> from LLVM libc and get the rest from the system libc. Note that, one will
> have to use the header files from the system libc and not the ones from
> LLVM libc as LLVM libc's header files are not complete (there will
> potentially be ABI issues but we can restrict to functions which are not
> ABI critical like string and math functions). Does such a scheme interest
> you. We have a downstream config where we do this but I never tried it with
> an external project. If there is a wider interest in such a scheme, we
> should be able to add/document instructions on how to do it.
>
>
> I'd be interested.  I'd be glad to beta test following your instructions
> and to provide you feedback.
>

Sure. Will do so soon and get back to you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libc-dev/attachments/20200814/f4f0164e/attachment.html>


More information about the libc-dev mailing list