On Thu, May 23, 2013 at 3:28 PM, Greg Fitzgerald <span dir="ltr"><<a href="mailto:garious@gmail.com" target="_blank">garious@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><font face="arial, sans-serif">Hi Jim,</font></div><div class="im"><span style="font-family:arial,sans-serif;font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
> Perhaps I’m misunderstanding you. Are you suggesting </span><div>

<span style="font-family:arial,sans-serif;font-size:13px">> using QEMU as part of the LLVM build process?</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div><div>
<font face="arial, sans-serif">Just for the case of building the runtime libraries for a cross-compiled version of clang.</font></div>

</div><div><br></div><div><span style="font-family:arial,sans-serif">Another option is to have the compiler-rt build depend on a host build of clang.</span></div></div></blockquote><div><br></div><div>I think you mean "build" not "host" here.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-family:arial,sans-serif"> So when cross-compiling clang, we'd generate two clang builds: a target version to ship,</span></div>
</div></blockquote><div><br></div><div>I think you mean "host" not "target" here.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><span style="font-family:arial,sans-serif">and a throwaway host version that only exists to cross-compile compiler-rt.</span></div></div></blockquote><div><br></div><div>I think you mean "build" not "host" here.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font face="arial, sans-serif">I think this second option is the more elegant one (less source dependencies), but is it possible in a single CMake build?</font></div>
</div></blockquote><div><br></div><div>Right now, no, but I don't see why that's a problem. Running cmake multiple times is not difficult. Also, there's no reason to think that we need to use a just-built clang to build compiler-rt. *Any* compiler which can build compiler-rt and can target whatever platform we want runtimes for is fine, and by running cmake manually, we get to pick whichever compiler makes sense for that.</div>
<div><br></div><div>Is this really a problem for which we need some kind of automation in the build system?</div></div>