[llvm-dev] What is the correct way to cross-compile LLVM and run the (in-tree) tests on a target board?

Jonathan Roelofs via llvm-dev llvm-dev at lists.llvm.org
Sat Feb 13 08:22:20 PST 2016



On 2/2/16 9:21 AM, Vasileios Kalintiris via llvm-dev wrote:
> Hi all,
>
> Is there any way to cross-compile LLVM and run check-all, or just the
> llvm-lit tests, (after moving the build directory) on the target
> machine?

You mean on the $host, when $build != $host? The only real $target tests 
are for the runtimes.

For libcxx and libcxxabi, there's a TargetExecutor thing that can be 
used to execute tests on a remote target over ssh (or with a script). 
Compiler-rt has a similar thing, with executor scripts, but I don't know 
the details.

>
> As far as I can tell from the CMakefiles, there's support only for
> cross-compiling LLVM and not for running the tests with the resulting
> compiler.

As for running the host tests in the lit suite when $host != $build, I 
think copying is sufficient. We cross-build from linux build machines to 
windows+cygwin host machines, and to run the tests we just nfs mount the 
build dir on the windows machine and fire up the testsuite in the 
"normal" way, just on the other machine.


Jon

>
> Thanks, Vasileios
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded


More information about the llvm-dev mailing list