Martin J. O'Riordan
2014-Jan-10 11:57 UTC
[LLVMdev] Specify the default target when configuring LLVM
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.
Robinson, Paul
2014-Jan-10 19:07 UTC
[LLVMdev] Specify the default target when configuring LLVM
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> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Martin J. O'Riordan > Sent: Friday, January 10, 2014 3:57 AM > To: llvmdev at cs.uiuc.edu > Subject: [LLVMdev] Specify the default target when configuring LLVM > > 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 > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Martin J. O'Riordan
2014-Jan-18 10:53 UTC
[LLVMdev] Specify the default target when configuring LLVM
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 -----Original Message----- From: Robinson, Paul [mailto:Paul_Robinson at playstation.sony.com] Sent: 10 January 2014 19:07 To: Martin.ORiordan at movidius.com; llvmdev at cs.uiuc.edu Subject: RE: [LLVMdev] Specify the default target when configuring LLVM 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> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Martin J. O'Riordan > Sent: Friday, January 10, 2014 3:57 AM > To: llvmdev at cs.uiuc.edu > Subject: [LLVMdev] Specify the default target when configuring LLVM > > 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 > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev