Created attachment 471962 [details] emerge --info Portage asked me to put >=sys-devel/llvm-3.7.1-r3 clang in /etc/portage/package.use But now, it takes hours to emerge. Fri Apr 7 21:39:46 2017 >>> sys-devel/llvm-3.9.1-r1 merge time: 3 hours, 1 minute and 3 seconds. without clang : Wed Apr 26 18:25:31 2017 >>> sys-devel/llvm-3.9.1-r1 merge time: 9 minutes and 44 seconds. But my system require clang for llvm. I use distcc and ccache.
(In reply to Christophe PEREZ from comment #0) > But my system require clang for llvm. What exactly requires it? Can't you work around the requirement?
I'm sorry but it is simply a large piece of software and it takes time, there's no way around it. Plus, it's heavy C++, so if you do not have a lot of memory and/or use high -j you're quite likely to hit swapping. 4G RAM can barely handle some of the files being compiled. Your results aren't really meaningful because the run 'without clang' uses cached results from the first run. You can presume that clang adds 50%-75% of build time but it won't make a difference that big. On the plus side, LLVM is not updated that frequently. Upstream does major releases every 6 months, plus usually one bugfix release. Add 2 or 3 revbumps for minor Gentoo bugfixes (which usually do not hit stable). I'm trying to make things easier but there are limits on what we can do, and we're mostly relying on what upstream allows us to do. For example, in version 4 I've split LLVM and clang into separate packages which makes the builds more independent and therefore lighter. Only recently I've added LLVM_TARGETS to make it possible to disable backends that are not necessary -- which can give significant time savings compared to building all of them (previous USE=multitarget). If you do not have any use for clang as a compiler or C/C++ backend library, then it is most likely pulled in as a dependency of OpenCL. If you do not wish to use OpenCL, you may disable the relevant flags on media-libs/mesa; but probably there's no point doing that at this point.