LLVM Cross-Compiler
Difficulty level |
---|
Advanced |
Is as simple as that:
mkdir crossllvm
cd crossllvm
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ../..
mkdir build
cd build
cmake ../llvm
make
After building you will have a compiler able to output multiple output formats regardless of your current platform, you can specify x86 ELF output format (for example) to clang using "-ccc-host-triple i686-pc-linux-gnu".
TODO: describe non-svn build from released tarballs.