<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Sep 2, 2014, at 6:35 AM, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On 8/28/2014 4:22 PM, Chandler Carruth wrote:<br><blockquote type="cite">Adding folks with specific knowledge of the compiler-rt and cmake and<br>the trickiness there...<br><br>On Thu, Aug 28, 2014 at 1:13 PM, Chris Bieneman wrote:<br><br>    The attached patch modifies how cross compiling is handled with<br>    CMake to make it possible to cross compile LLVM and Clang using a<br>    single CMake invocation. This patch works for LLVM & Clang with no<br>    additional patches required. It does not work for compiler-rt<br>    because of how compiler-rt's CMake configuration is implemented.<br></blockquote><br>Thanks for working on this.  I've glanced through the patch and<br>it looks correct for the approach intended.  I'm not set up to<br>apply and test the patch with an iOS toolchain so I cannot confirm<br>that it works.<br><br><blockquote type="cite">COMMAND ${CMAKE_BUILD_TOOL} ${target}<br>...<br>COMMAND ${CMAKE_BUILD_TOOL} llvm-config<br></blockquote><br>FYI, these custom commands may be better written with the form<br><br> cmake --build . --target ${target} --config $<CONFIGURATION><br><br>in order to work across all CMake generators (note that the<br>$<CONFIGURATION> is literal: it is a generator expression).<br><br>Another completely different approach is to use the ExternalProject<br>module to create a "superbuild" from a tiny source tree that does<br>nothing but use ExternalProject_Add to configure the host and target<br>builds separately and in order.<br><br>-Brad<br></blockquote></div><br></body></html>