[LLVMdev] Specify the default target when configuring LLVM

Martin J. O'Riordan Martin.ORiordan at movidius.com
Fri Jan 10 03:57:03 PST 2014


We have added our own proprietary target to LLVM and up until recently it
was configured only for this target.  I now build it to include additional
targets and this all works fine, I just need to specify the associated
triple when compiling and the correct code-generator is selected.

But I would like to have it default to the triple for our processor when no
triple is specified, and while I can get this to work when I configure/build
using 'cmake' passing:

    cmake ... -DLLVM_TARGETS_TO_BUILD=Ours;X86;Sparc
-DLLVM_DEFAULT_TARGET_TRIPLE=ours ...

I can't seem to get the equivalent to work when I use regular 'configure'
and 'make', and it always defaults to the target corresponding to the
machine building the cross-compiler (in my case this is X86).  Is there a
way of configuring for regular 'make' that will behave the same a the
'cmake' build?

My current LLVM is v3.2 and I am updating to v3.3 at the moment, and will
update to v3.4 soon after.  This seems to be the same for v3.2 and v3.3, I
haven't examined the changes for v3.4 yet.

Thanks,

	Martin O'Riordan - Movidius Ltd.





More information about the llvm-dev mailing list