<div dir="ltr"><div>Sorry for the late response.</div><div><br></div><div>You should check out CMAKE_TOOLCHAIN_FILE logic for Android platform - IIRC build rules for Android are much simpler than for Darwin/Linux,</div><div>and assume that build tree will be properly configured to build a single compiler-rt runtime for a specific triple. Probably this is the approach you want</div><div>to eventually use for another platforms.</div><div><br></div><div>Also check out LLVM_BUILD_EXTERNAL_COMPILER_RT flag, which is an attempt to use ExternalProject to recursively call CMake from LLVM/Clang</div><div>build tree. It doesn't iterate over all the target triples we want/can support, though. It had some problems with Ninja, though.</div><div><br></div><div>I'd also prefer to not move host==target to a special case, at least at the beginning.</div><div><br></div>I definitely support the effort of simplifying things and generalizing the OS-specific code in CMake. Patches are more than welcome here =)<div><div><div><div><br></div><div>We want to support building (at least part of) compiler-rt libraries with GCC. I'm mostly speaking about sanitizers here:</div><div>sanitizer runtimes shipped with GCC are built from the same sources we have in compiler-rt. However, I agree that it</div><div>should not be the default (just-built Clang should be the default) - we can just setup a buildbot that would build</div><div>standalone compiler-rt with GCC.</div><div><br></div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 4, 2015 at 3:45 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.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"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Jun 4, 2015 at 3:02 PM, Chris Bieneman <span dir="ltr"><<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>One of my concerns is actually that the custom rules we have for the sanitizer test suite doesn’t work at all on Darwin unless you have the OS headers installed to / (which isn’t the default anymore). I think that teaching CMake to be smart enough about how it invokes the compiler to be able to support all our platforms will be a lot of work duplicating things CMake itself already does.</div></div></blockquote><div><br></div></span><div>Right, for problems like this, we'd end up writing lots of cmake code to go and find headers and libraries like this, effectively replacing the toolchain knowledge that we could get from cmake. It's a tradeoff that may or may not be worth it, and I'm not sure what the answer is. =/</div><div><br></div><div>Maybe if we use the standard cmake cross-compilation approach someone will come along later and solve this problem at the cmake level.</div></div></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</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>