[PATCH] D29030: [LNT] Add cross-compilation support to 'lnt runtest test-suite'

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 09:16:52 PST 2017


MatzeB added a comment.

In https://reviews.llvm.org/D29030#653483, @MatzeB wrote:

> What about the existing --cmake-cache flag? We are happily using this for crosscompiling since the early days.
>  You can find our toolchain files in test-suite/cmake/caches/target-*.cmake. I haven't used the cmake `XXX_EXTERNAL_TOOLCHAIN` and `XXX_TARGET` flags of cmake yet (as I believe they don't match how xcode toolchains work when crosscompiling) but hopefully they just work in your case.
>
> Some tips on the cache file you proposed above:
>
> - You most probably need `set(Variable Value CACHE STRING "")` to have any effects
> - I introduced TEST_SUITE_ARCH_FLAGS for cases where you want to add crosscompilation related flags to all compiler and linker invocations. Having this in a separate variable is often useful as you don't compete with people passing in custom C/C++ flags and overriding the flags necessary for the cross compilation.


Reading the cmake docu I realize their toolchain files are something different than using cache files. So those two points are probably not relevant to you.

As for the rest of the commit: Using a toolchain file looks like just passing a -D flag which is already supported. As for picking up the compiler, couldn't you simply extract that from CMakeCache.txt? And if that doesn't work, shouldn't we rather upstream the changes to CMakeLists.txt that print the compiler instead of having LNT mess around with them?


https://reviews.llvm.org/D29030





More information about the llvm-commits mailing list