[cfe-dev] Building Cross Compiler

Daniel Dilts diltsman at gmail.com
Thu Jan 15 13:53:26 PST 2015


I am using the following CMake command to (hopefully) build a cross
compiler.

cmake -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM
-DLLVM_DEFAULT_TARGET_TRIPLE=armv7a-none-eabi -DCMAKE_CROSSCOMPILING=True
..\llvm

In the CMake output I see

-- Target triple: i686-pc-win32
-- Native target architecture is ARM

Which confused me.  I spent two days (5 minutes here and there) trying to
get the triple right before I gave up.  I compiled the VS2013 solution that
was generated and then ran clang --version and got the following output

PS D:\llvm\build> clang --version
clang version 3.7.0 (trunk 226193)
Target: armv7a-none--eabi
Thread model: posix

It seems that the CMake script outputs the wrong triple, but clang outputs
the correct triple (with an extra '-').  Am I missing something or is this
a bug in the build script?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150115/b80914de/attachment.html>


More information about the cfe-dev mailing list