[LLVMdev] Basic question- cross compiling LLVM

Eli Friedman eli.friedman at gmail.com
Mon Jul 20 05:36:44 PDT 2009


On Mon, Jul 20, 2009 at 4:15 AM, Carter Cheng<carter_cheng at yahoo.com> wrote:
> This is probably another very basic question- but is there a simple method for cross compiling LLVM for another platform?

If you already have a cross-compiling environment set up, it shouldn't
be too hard; for LLVM and llvm-gcc, you should be able to pass in
--host=mytarget to configure, and if you're lucky, it'll just work
(but for llvm-gcc, make sure to read the README file first).

There's a script to compile a complete cross-compile environment plus
LLVM and llvm-gcc for ARM in
utils/crosstool/ARM/build-install-linux.sh in the LLVM tree; that
might be useful as a reference, depending on what you're doing.

-Eli



More information about the llvm-dev mailing list