Currently llvm and clang only allow to select all targets or the host target. There are other interesting targets, like cbe or cpp, which I would like to enable without also compiling in support for all other targets (I assume that would take even longer to build). Attached patch achieves this using 2 additional useflags: ctarget and cpptarget. Reproducible: Always
Created attachment 313747 [details, diff] llvm-2.9-r3 supporting USE=ctarget/cpptarget
Created attachment 313749 [details, diff] clang-2.9-r2 supporting USE=ctarget/cpptarget
Two additional flags is a no-go. If we want the precise target selection, we'd probably create a new USE_EXPAND with all of them. But honestly, USE=multitarget is not bad. I'd say the whole time needed to compile llvm/clang is long enough so that benefit of USE=-multitarget is debatable.
(In reply to comment #3) > I'd say the whole time needed to compile llvm/clang is long enough so that > benefit of USE=-multitarget is debatable. Do you have numbers - how long does USE=multitarget take compared to USE=-multitarget? Since it already takes so long I was afraid to try it myself.
(In reply to comment #4) > (In reply to comment #3) > > I'd say the whole time needed to compile llvm/clang is long enough so that > > benefit of USE=-multitarget is debatable. > Do you have numbers - how long does USE=multitarget take compared to > USE=-multitarget? Since it already takes so long I was afraid to try it > myself. Sun May 13 19:48:22 2012 >>> sys-devel/llvm-9999 merge time: 17 minutes and 57 seconds. Sun May 20 11:03:25 2012 >>> sys-devel/llvm-9999 merge time: 19 minutes and 36 seconds. Tue May 22 22:01:46 2012 >>> sys-devel/llvm-9999 merge time: 21 minutes and 51 seconds. Thu May 24 17:44:59 2012 >>> sys-devel/llvm-9999 merge time: 23 minutes and 16 seconds. Not sure where the switch happened but as you can see, the time gets pretty random. OTOH, if those are pretty useful targets, we probably could just enable them by default. Is there any nice listing of llvm targets with explanation somewhere?
(In reply to comment #5) > Not sure where the switch happened but as you can see, the time gets pretty > random. In that case I would even vote for making multitarget the default... > OTOH, if those are pretty useful targets, we probably could just enable them > by default. Is there any nice listing of llvm targets with explanation > somewhere? There is a list of "traditional" targets [1], but I doubt you are interested in that. I drew my information (after reading the release notes and someone else's code which called clang -march=c) from the configure file... [1] http://llvm.org/docs/GettingStarted.html#config
(In reply to comment #6) > > OTOH, if those are pretty useful targets, we probably could just enable them > > by default. Is there any nice listing of llvm targets with explanation > > somewhere? > There is a list of "traditional" targets [1], but I doubt you are interested > in that. I drew my information (after reading the release notes and someone > else's code which called clang -march=c) from the configure file... Well, I was able to find 'cpp' description in the file and it is interesting and portable indeed. However, I don't see 'cbe' in LLVM... Bernard, what do you think? Can I just enable 'cpp' along with host by default? It outputs C++ code which invokes LLVM.
(In reply to comment #7) > (In reply to comment #6) > > > OTOH, if those are pretty useful targets, we probably could just enable them > > > by default. Is there any nice listing of llvm targets with explanation > > > somewhere? > > There is a list of "traditional" targets [1], but I doubt you are interested > > in that. I drew my information (after reading the release notes and someone > > else's code which called clang -march=c) from the configure file... > > Well, I was able to find 'cpp' description in the file and it is interesting > and portable indeed. However, I don't see 'cbe' in LLVM... The C backend was removed in 3.1 and broken in 3.0. > Bernard, what do you think? Can I just enable 'cpp' along with host by > default? It outputs C++ code which invokes LLVM. Please note that configure will not recognize "host-only" if it is not the only parameter. It appears to be an alias for "host" and you have to use that instead.
The cpp target definitely sounds interesting! The ptx one also sounds promising (emitting assembly code for nvidia GPUs), and does not really match a known CPU either. I'm all for cpp with USE=-multitarget as a first step. If there are more non-cpu targets in the future, we can think about USE_EXPAND.
(In reply to comment #9) > I'm all for cpp with USE=-multitarget as a first step. If there are more > non-cpu targets in the future, we can think about USE_EXPAND. I will do that in -r3 and it once we get all -r2 breakages fixed for it.
I've enabled cpp in -9999 ebuilds. ryao, when you are going to revbump clang once again, please revbump llvm as well syncing the --enable-targets to -9999.
/var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-3.1-r2.ebuild,v <-- llvm-3.1-r2.ebuild initial revision: 1.1 /var/cvsroot/gentoo-x86/sys-devel/clang/clang-3.1-r5.ebuild,v <-- clang-3.1-r5.ebuild initial revision: 1.1 Those versions are guaranteed to have cpp always enabled.
This is now truly fixed in 3.9.0, with LLVM_TARGETS!
*** Bug 595036 has been marked as a duplicate of this bug. ***
*** Bug 523732 has been marked as a duplicate of this bug. ***