Skip to content
  • Erik de Castro Lopo's avatar
    LlvmCodeGen cross-compiling fixes (#9895) · 58ac9c8f
    Erik de Castro Lopo authored
    
    
    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: default avatarErik 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
    58ac9c8f