LlvmCodeGen cross-compiling fixes (#9895)
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 27 Dec 2014 10:11:52 +0000 (21:11 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 28 Dec 2014 23:42:53 +0000 (10:42 +1100)
commit58ac9c8f6e986bac817ad08d5a2fd11cd167f029
tree3a8889d2ae51f3301629f29fddfb1b43c01dc861
parent0cc0cc8688ddb53db65a73d7d562e9564cfad22b
LlvmCodeGen cross-compiling fixes (#9895)

Summary:
* Throw an error when cross-compiling without a target definition.
  When cross compiling via LLVM, a target 'datalayout' and 'triple' must
  be defined or LLVM will generate code for the compile host instead of
  the compile target.

* Add aarch64-unknown-linux-gnu target.
  The datalayout and triple lines were found by using clang to compile a
  small C program and -emit-llvm to get the LLVM IR output.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Test Plan: validate

Reviewers: rwbarton, carter, hvr, bgamari, austin

Reviewed By: austin

Subscribers: carter, thomie, garious

Differential Revision: https://phabricator.haskell.org/D585

GHC Trac Issues: #9895
compiler/llvmGen/LlvmCodeGen/Ppr.hs
compiler/main/SysTools.hs
compiler/utils/Platform.hs
settings.in