Enable sccache by default when available
Categories
(Firefox Build System :: General, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: gps, Unassigned)
References
Details
(Keywords: in-triage)
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Per conversation with :kmoir, I'm going through untriaged bugs in her components and marking the ones which look to be enhancements/tasks with the enhancement
severity to get them out of the triage queue.
If this incorrect, please remove the tag.
Comment 5•6 years ago
|
||
I think requiring sccache is a harder sell, but enabling it by default when it's available should be reasonable and developers could still use --without-ccache
to disable it. If we install sccache from bootstrap (bug 1499145) then the default state for most developers should be that they'll wind up using the toolchain sccache that we installed and life will be good.
Comment 6•6 years ago
|
||
Note that it won't do anything for people who do use ccache, which is kind of sad. However, considering ccache is faster than sccache for C++, it's a hard sell for pick sccache in that case. Plus, it would be a first where we wouldn't actually apply some explicit option, and that would not be great. A reasonable option here would be to add a separate flag for "rust-caching", which would itself default to sccache if available.
FWIW I would love to be able to cache only Rust compilation and not C++. (I often test C++ compiler changes where everything would just end up as a cache miss, but I pretty much never touch Rust sources.)
Updated•6 years ago
|
Comment 8•6 years ago
|
||
(In reply to David Major [:dmajor] from comment #7)
FWIW I would love to be able to cache only Rust compilation and not C++. (I often test C++ compiler changes where everything would just end up as a cache miss, but I pretty much never touch Rust sources.)
I'm under the impression that export RUSTC_WRAPPER=sccache
does this.
(In reply to Myk Melez [:myk] [@mykmelez] from comment #8)
(In reply to David Major [:dmajor] from comment #7)
FWIW I would love to be able to cache only Rust compilation and not C++. (I often test C++ compiler changes where everything would just end up as a cache miss, but I pretty much never touch Rust sources.)
I'm under the impression that
export RUSTC_WRAPPER=sccache
does this.
This doesn't appear to have any effect on my build.
Comment 10•6 years ago
|
||
(In reply to David Major [:dmajor] from comment #9)
(In reply to Myk Melez [:myk] [@mykmelez] from comment #8)
I'm under the impression that
export RUSTC_WRAPPER=sccache
does this.This doesn't appear to have any effect on my build.
Hmm, indeed. According to this dev.platform thread, mk_add_options "export RUSTC_WRAPPER=sccache"
is supposed to work (but doesn't); however putting export RUSTC_WRAPPER=sccache
into your shell's profile startup file does work. I've just confirmed that by adding it to ~/.profile (on macOS), building, clobbering, building again, and checking the cache stats via sccache -s
.
Updated•3 years ago
|
Updated•2 years ago
|
Description
•