enable Hexagon target from cmake
authorSebastian Pop <spop@codeaurora.org>
Wed, 8 Aug 2012 17:45:43 +0000 (17:45 +0000)
committerSebastian Pop <spop@codeaurora.org>
Wed, 8 Aug 2012 17:45:43 +0000 (17:45 +0000)
commit7e9da1d4e83b9fa20b014827f2ed11dd1f4d1b23
treec1e70f9ae16edbf7b41541504a40a7dab2432f81
parentd2ff32aa945ccf0a6c14062505ee1f59bcc1d94c
enable Hexagon target from cmake

This patch allows us to use cmake to specify a cross compiler for Hexagon.

In particular, the patch adds a missing case for the target Hexagon in
cmake/config-ix.cmake, and 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:

$ cmake -G Ninja -D BUILD_SHARED_LIBS:BOOL=ON -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 -D LLVM_ENABLE_PIC:BOOL=OFF ..
$ ninja check

llvm-svn: 161504
llvm/CMakeLists.txt
llvm/cmake/config-ix.cmake