Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617848 - sys-devel/llvm-3.9.1-r1 USE=clang takes hours to emerge
Summary: sys-devel/llvm-3.9.1-r1 USE=clang takes hours to emerge
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-08 14:39 UTC by Christophe PEREZ
Modified: 2017-05-15 19:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,6.25 KB, text/plain)
2017-05-08 14:39 UTC, Christophe PEREZ
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe PEREZ 2017-05-08 14:39:53 UTC
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.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2017-05-15 19:49:00 UTC
(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?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-05-15 19:59:40 UTC
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.