Skip to content
  • Sebastian Pop's avatar
    enable cross compilation with cmake · faeca292
    Sebastian Pop authored
    This patch allows us to use cmake to specify a cross compiler: target different
    than host. In particular, it moves LLVM_DEFAULT_TARGET_TRIPLE and TARGET_TRIPLE
    variables from cmake/config-ix.cmake to the toplevel CMakeLists.txt to make them
    available at configure time.
    
    Here is the command line that I have used to test my patches to create a Hexagon
    cross compiler hosted on x86:
    
    $ cmake -G Ninja -D LLVM_TARGETS_TO_BUILD:STRING=Hexagon -D TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_TARGET_ARCH:STRING=hexagon-unknown-linux-gnu ..
    $ ninja check
    
    llvm-svn: 162219
    faeca292
Loading