[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
Gergö Barany
gergo at complang.tuwien.ac.at
Mon Jun 18 03:36:13 PDT 2012
On Sat, Jun 16, 2012 at 20:20:23 +0900, Journeyer J. Joh wrote:
> I wonder if llvm/Clang can compile C or C++ for ARM from on x86.
Yes. I use
clang -emit-llvm -ccc-host-triple arm-unknown-linux-gnu -I /..arm../include/
to generate LLVM bitcode files for ARM. llc then automagically knows to
generate ARM assembly, and ARM binutils take it from there.
> If the cross compiling is supported, is there any documentation on how to
> do it?
Dunno. Last time I looked, the documentation of clang's command line flags
disagreed with reality, and the -ccc-host-triple flag wasn't documented
anywhere. This might have changed in the meantime.
--
Gergö Barany, research assistant gergo at complang.tuwien.ac.at
Institute of Computer Languages http://www.complang.tuwien.ac.at/gergo/
Vienna University of Technology Tel: +43-1-58801-58522
Argentinierstrasse 8/E185, 1040 Wien, Austria Fax: +43-1-58801-18598
More information about the llvm-dev
mailing list