<div dir="ltr">Thank you for bringing this up, Chris! I strongly agree with (3), i.e. separating builtins and the rest of compiler-rt libraries (mostly sanitizers) - they are just too different conceptually to use the same<div>configuration and build process.</div><div><br></div><div>I would love to have builtins-specific CMake functionality factored out - stuff like choosing between C and target-specific ASM implementations of the same functions, or generating the list of required</div><div>functions for various Apple platforms. For that matter, I'm not sure there are that many "common" pieces of CMake configuration functionality we should care about sharing - builtins don't require checks</div><div>for system libraries like libpthread/libdl, don't require on presence of certain headers, or compile-time flags (-W family, -fomit-frame-pointer etc.). What needs to be shared is the scripts used to figure out</div><div>the set of supported architectures and OSes, and I have a question here - do you consider switching (at least builtins library) to single-arch build, so that the user would need to setup several build trees for</div><div>each architecture they are targeting (or these trees would all be separate ExternalProjects, if configured from, say, Clang's CMake)?</div><div><br></div><div>Speaking of implementation, I think it's a good idea to make lib/builtins a valid top-level source directory for CMake invocation. Using ExternalProject to add it from compiler-rt root is optional.</div><div><br></div><div>libc++/libc++abi hopefully should not be an issue, because none of sanitizers depend on them. Sanitizers do heavily depend on libc (sometimes even specific versions of glibc, though we do out best to hide it).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 9:42 AM, Martell Malone via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">Thanks for pointing this out and I hope llvm-ar is up to the task.<br></span><span style="font-size:12.8px">Even if targets must still port binutils, each step toward LLVM<br></span><span style="font-size:12.8px">self-reliance is a step in the right direction.</span><br style="font-size:12.8px"><span style="font-size:12.8px">Without getting too far ahead of ourselves, refactoring built-ins into<br></span><span style="font-size:12.8px">a distinct library is a great place to start.</span></blockquote></span><div>+1<br>This was my line of thinking </div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 6:36 PM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">I will not be stripping out any of the existing CMake. If we go down this path what I’m going to do is refactor the CMake to produce to logically separated projects so that the builtins can be built with or without the runtime libraries. It will all still be CMake-based.</span></blockquote></span><div>Sorry. s/stripping/seperating/g<br>I was still thinking about the stripping of the IOS build from the OSX default build :)</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 6:30 PM, Chris Bieneman <span dir="ltr"><<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Nov 3, 2015, at 9:24 AM, Martell Malone <<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">Cool. This then makes your other point about requiring LLVM tools less of an issue because the out-of-tree builds can use whatever tools you choose. We just need to make the builtins work so that you don’t need them already built.</span></blockquote><div>With that in mind for an intiial solution before you get to stripping out the cmake stuff so that it can do an out of tree bootstrap.<br>I have created a script that fits into the make bootstrapping method that already exists.<br>Not sure if this is up for removal because it is not dependent on auto tools?</div></div></div></blockquote><div><br></div></span><div>I will not be stripping out any of the existing CMake. If we go down this path what I’m going to do is refactor the CMake to produce to logically separated projects so that the builtins can be built with or without the runtime libraries. It will all still be CMake-based.</div><span><font color="#888888"><div><br></div><div>-Chris</div></font></span><span><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Chris could you kindly add yourself as a reviewer to this <br><a href="http://reviews.llvm.org/D14290" target="_blank">http://reviews.llvm.org/D14290</a><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 6:15 PM, C Bergström <span dir="ltr"><<a href="mailto:cbergstrom@pathscale.com" target="_blank">cbergstrom@pathscale.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On Wed, Nov 4, 2015 at 12:12 AM, Steve King via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> On Tue, Nov 3, 2015 at 6:33 AM, Martell Malone <<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>> wrote:<br>
>> Just as a point for building the builtins shouldn't we just need llvm-ar ?<br>
><br>
> Thanks for pointing this out and I hope llvm-ar is up to the task.<br>
> Even if targets must still port binutils, each step toward LLVM<br>
> self-reliance is a step in the right direction.<br>
><br>
> Without getting too far ahead of ourselves, refactoring built-ins into<br>
> a distinct library is a great place to start.<br>
<br>
</div></div>Before anyone starts refactoring binutils - if you're really zealous<br>
or have some strong logical reason against it - there is the BSD elf<br>
tools project<br>
<br>
<a href="http://sourceforge.net/p/elftoolchain/wiki/Home/" rel="noreferrer" target="_blank">http://sourceforge.net/p/elftoolchain/wiki/Home/</a><br>
</blockquote></div><br></div>
</div></blockquote></span></div><br></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>