[LLVMdev] Specify the default target when configuring LLVM

1,218 views
Skip to first unread message

Martin J. O'Riordan

unread,
Jan 10, 2014, 6:57:03 AM1/10/14
to llv...@cs.uiuc.edu
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.


_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Robinson, Paul

unread,
Jan 10, 2014, 2:07:16 PM1/10/14
to Martin....@movidius.com, llv...@cs.uiuc.edu
I'm pretty ignorant about configure but our top-level makefile has
configure --target=your-default-triple [other stuff...]
We also specify --host and --build which I'm not entirely clear on
whether they're necessary (don't know if/how these three interact).
--paulr

Martin J. O'Riordan

unread,
Jan 18, 2014, 5:53:30 AM1/18/14
to Robinson, Paul, llv...@cs.uiuc.edu
Thanks Paul, that's exactly what I needed. For some reason I never thought
to use '--target' in conjunction with --enable-targets'.

Apologies for the delay in getting back to you, was unwell for a few days.

All the best,

MartinO
Reply all
Reply to author
Forward
0 new messages