LLVM & Clang can't compile for a supported arch

后端 未结 6 1173
花落未央
花落未央 2020-12-30 10:07

Under Ubuntu 64 bit I got

llc --version
LLVM (http://llvm.org/):
  LLVM version 3.1
  Optimized build with assertions.
  Built Oct 15 2012 (18:15:59).
  Defa         


        
6条回答
  •  隐瞒了意图╮
    2020-12-30 10:54

    -march is LLVM's internal tools command line option and is not connected with clang at all. If you need to compile for other target you need to specify the target triplet. This can be done in several ways (I do not remember offhand, whether they work with 3.1, but they definitely work with 3.2):

    • Make a link from clang to your-target-triple-clang, e.g. to arm-none-linux-gnueabi-clang and compile everything via it
    • Provide -target option, e.g. clang -target arm-none-linux-gnueabi

提交回复
热议问题