Firefox has a build option, --enable-unified-compilation. This concatenates many C++ files together to improve both build time and compiler optimizations. (It does make the build more memory-hungry, though.) It would be nice if this flag could be easily enabled or was even the default. I would have just passed this myself using ECONF_EXTRAS, but that doesn't seem to work for mozconfig ebuilds.
Does it really make sense nowadays, when we are going to have some LTO soon?
Created attachment 378848 [details, diff] Patch to firefox-30.ebuild
Nice hint! Tue May 20 18:51:26 2014 >>> www-client/firefox-29.0.1 merge time: 22 minutes and 30 seconds. Sat Jun 14 10:21:45 2014 >>> www-client/firefox-30.0 merge time: 15 minutes and 9 seconds. ~ 30% compile time improvment
As Cănărău demonstrated, the main advantage is improved compilation time, which is orthogonal to LTO.
since v31 also Thunderbird support this configure option. Compile time improvments are spectacular.
I'm not certain I want to add this as an option, but what I may be able to do is add --enable-unified-compilation to the mozconfig when it exists in EXTRA_ECONF. Would that suffice?
That sounds fine.
Ok, so in mozilla-overlay i updated the eclass so that it honors the value(s) specified in EXTRA_ECONF. FYI, if you break it you pick up the pieces. Right now, it just passes everything through to mozconfig; likely I will add a whitelist of allowable options at some point before this is added to the portage tree but we shall see.
...this bug may soon be moot; if I'm reading configure.in from firefox-33 correctly, unified-compilation is enabled by default. I'm going to look closer to confirm, and if that's the case then I'm going to leave it to upstream to set the default. I may still consider enabling this option in 31ESR as well, but there are more urgent issues I have to sort out before I can test that fully.
confirmed, mozilla 31.2 and 33 codebases both have unified compilation enabled by default and we would need to explicitly disable it in our configuration, which we don't. Closing this one, as I don't want to open EXTRA_ECONF generally at this time.