Set SCCACHE_BASEDIRS by default for local builds again with sccache 0.20
Categories
(Firefox Build System :: General, task)
Tracking
(firefox163 fixed)
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: Logan, Assigned: Logan)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Bug 2086340 limited the default SCCACHE_BASEDIRS to automation, because with the local disk cache's preprocessor (direct) mode, sccache could return an object file built in another checkout whose headers differ (https://github.com/mozilla/sccache/issues/2863).
That was fixed upstream in https://github.com/mozilla/sccache/pull/2868, which shipped in sccache 0.20.0, and bug 2085611 updated the toolchain to 0.20.0. The repros from sccache issue 2863 now miss the cache and compile the right object with 0.20.0, while 0.18.0 still returns the stale one.
The default can apply to local builds again, as long as the sccache in use is 0.20 or later. Older versions should keep getting no default.
| Assignee | ||
Comment 1•3 days ago
|
||
sccache 0.20 fixes the preprocessor cache returning objects built in another
checkout with basedirs set (mozilla/sccache#2868), so the automation-only
limit from bug 2086340 is no longer needed with it. As before that bug,
objects shared between local checkouts keep the original checkout's paths
in their debug information unless path remapping is enabled.
| Assignee | ||
Comment 2•3 days ago
|
||
sccache 0.20.0, which we already pin since bug 2085611, includes the fix for mozilla/sccache#2863. I checked it with the repro scripts from that issue. 0.18.0 hands back the object built in the other checkout. 0.20.0 misses and recompiles, and identical trees still get cache hits.
One tradeoff for reviewers: local builds don't use --enable-path-remapping by default. So an object reused from another checkout keeps that checkout's paths in its debug info and __FILE__ strings. The generated code is correct, but a debugger can point at the other worktree, or at one that's been deleted. That was already true before bug 2086340 limited the default to automation, and the docs now mention it. Anyone who minds can enable path remapping or set SCCACHE_BASEDIRS themselves.
Description
•