So, I'm OK with this going in, but I'd appreciate some more severe comments around it to warn people away -- we simply can't push this hack much further.<div><br></div><div>I think to do more extensive cross builds we'll need to actually set up a cross-compilation environment for LLVM+compiler-rt (not necessarily Clang). CMake has "support" for this, but it is awkward and cumbersome. I'm not even an expert in how to use it. My understanding is that you configure a completely separate cmake build tree and supply it a special input file that describes how to proceed with target != host.</div>
<div><br></div><div>My current best idea for how to support this long term is as follows:</div><div><br></div><div>We add to CMake the ability to "recurse". the compiler-rt build system would automatically populate the target configurations for the runtime libraries where target == host, but would also have build rules that would create a new, separate build tree *underneath* the existing build tree, automatically configure cmake within that tree to use the same source tree location, but with a particular target that the current host supports cross-compiling to. Then we recurse into this inner mini cmake build system to produce the key runtime libraries (and any target-executing binaries they require like the symbolizer, and any libraries those depend on).</div>
<div><br></div><div>This way, we can accumulate automatic minimal cross-build configs and setups in the project, and if you install the appropriate toolchains and SDKs, you can pass a flag to the top level build and it will enable recursing to produce certain extra traget outputs.</div>
<div><br></div><div>Anyways, this is quite a bit of work, and while I firmly believe it to be necessary in the long term, as the android stuff is still a bit experimental, I'm happy to have it unblocked. My suspicion is that you'll have to resolve this the moment the symbolizing stuff progresses.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 27, 2012 at 7:30 AM, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+cc chandlerc<div><br></div><div>LGTM.</div><div>We'd soon certainly need to generalize CMake rules for building for several targets, though.<br>
<br><div class="gmail_quote"><div><div class="h5">On Mon, Aug 27, 2012 at 5:55 PM, Evgeniy Stepanov <span dir="ltr"><<a href="mailto:eugeni.stepanov@gmail.com" target="_blank">eugeni.stepanov@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi,<br>
<br>
this is a first pass at cmake (cross-)build of ASan runtime for<br>
Android. The result does not run, but will be useful for catching<br>
build breakage, at least. I'll improve it incrementally.<br>
<br>
<a href="https://codereview.appspot.com/6475069/" target="_blank">https://codereview.appspot.com/6475069/</a><br>
<br></div></div>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>
</font></span></div>
</blockquote></div><br></div>