LLVM Cross-Compiler: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
mNo edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
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". |
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: beware that clang is both a cross-compiler and a host-compiler and you would have to specify some options to disable host functionality. |
|||
TODO: clang requires a fairly recent version of binutils to work, try 2.21 or above if you get assembly compilation errors. |
|||
TODO: describe non-svn build from released tarballs. |
TODO: describe non-svn build from released tarballs. |
Revision as of 08:46, 23 March 2012
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: beware that clang is both a cross-compiler and a host-compiler and you would have to specify some options to disable host functionality.
TODO: clang requires a fairly recent version of binutils to work, try 2.21 or above if you get assembly compilation errors.
TODO: describe non-svn build from released tarballs.