<div dir="ltr"><div dir="ltr">On Tue, Aug 11, 2020 at 12:51 PM Evandro Menezes via libc-dev <<a href="mailto:libc-dev@lists.llvm.org">libc-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">What are the best practices to cross build LLVM with libc?  <br>
<br>
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.  </blockquote><div><br></div><div>Hi,</div><div><br></div><div>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.</div><div><br></div><div>Thanks,</div><div>Siva Chandra</div></div></div>