Closed
Description
https://bugzilla.mozilla.org/show_bug.cgi?id=1436251
The other day I was experimenting with codegen-units, and realized that Firefox's build gets really slow with codgen-units=16 (the default):
with codegen-units=1
real 20m35.218s
user 135m46.044s
sys 5m49.332s
with default codegen-units (16)
real 38m3.751s
user 156m53.384s
sys 6m22.100s
I wasn't able to reduce the testcase.
If you wish to do it, use nightly to build Firefox with the following mozconfig file:
ac_add_options --enable-debug
ac_add_options --enable-optimize
ac_add_options --enable-release
and revert this patch: https://hg.mozilla.org/mozilla-central/rev/fe90c7d53a7c
A useful bit of information may be that we pass -Clto
only to the toplevel crate, i.e. we build with cargo rustc -- -Clto
. I don't remember but it might have been only the last crate ("gkrust") taking forever to build (I can retest this if you wish) so it might be some pathological case with LTO.