<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi, Siva.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 12, 2020, at 12:35, Siva Chandra <<a href="mailto:sivachandra@google.com" class="">sivachandra@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">On Tue, Aug 11, 2020 at 12:51 PM Evandro Menezes via libc-dev <<a href="mailto:libc-dev@lists.llvm.org" class="">libc-dev@lists.llvm.org</a>> wrote:<br class=""></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 class="">
<br class="">
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 class=""><br class=""></div><div class="">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></div>
</div></blockquote></div><div class=""><br class=""></div>I'd be interested.  I'd be glad to beta test following your instructions and to provide you feedback.<div class=""><br class=""></div><div class="">Thank you,</div><div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>__ </div><div>Evandro Menezes ◊ SiFive ◊ Austin, TX</div></div></div></div></div>
</div>
<br class=""></div></body></html>