Renato Golin <renato.golin at linaro.org> writes:> I currently use CMake+Ninja on native builds on both x86 and ARM without > problems, but I agree that cross-compilation is not yet mastered.What's wrong with cross-compilation?
Le 23 mai 2013 à 11:52, Óscar Fuentes <ofv at wanadoo.es> a écrit :> Renato Golin <renato.golin at linaro.org> writes: > >> I currently use CMake+Ninja on native builds on both x86 and ARM without >> problems, but I agree that cross-compilation is not yet mastered. > > What's wrong with cross-compilation? >At least http://llvm.org/bugs/show_bug.cgi?id=14109 As it does not use the just built clang to build compiler-rt, it can't build compiler-rt for target that are not supported by the system compiler. -- Jean-Daniel
>> I currently use CMake+Ninja on native builds on both x86 and ARM without >> problems, but I agree that cross-compilation is not yet mastered. > > What's wrong with cross-compilation?The biggest annoyance I have (I don't do compiler-rt) is that the dependencies for the host's TableGen aren't tracked properly in parallel builds. So while it knows it needs to build a host-executable TableGen it doesn't seem to know it has to wait for it to finish. This means builds take much longer because they have to be "-j 1" I tried poking around (a few times). But never quite got to the bottom of how LLVM and CMake combine to handle that situation (we diverge in some odd ways from the "recommended" documented methods). Other than that it's as simple as defining CMAKE_TOOLCHAIN_FILE and letting it get on with it for the basic case. Tim.
Jean-Daniel Dupas <devlists at shadowlab.org> writes:>> What's wrong with cross-compilation? > > At least http://llvm.org/bugs/show_bug.cgi?id=14109 > > As it does not use the just built clang to build compiler-rt, it can't > build compiler-rt for target that are not supported by the system > compiler.This could be easily done by executing a custom command that configures and builds compiler-rt after the clang cross-compiler is built, i.e. as the final step of building clang. Maybe I'm missing something. Eric, what's the difficulty with solving PR14109 ?
Tim Northover <t.p.northover at gmail.com> writes:>> What's wrong with cross-compilation? > > The biggest annoyance I have (I don't do compiler-rt) is that the > dependencies for the host's TableGen aren't tracked properly in > parallel builds. So while it knows it needs to build a host-executable > TableGen it doesn't seem to know it has to wait for it to finish.This is a bug, obviously, and one that should be easy to fix, if the tablegenning and cross-compiling logic are well localized in the LLVM cmake scripts.