Closed Bug 2098965 Opened 3 days ago Closed 2 days ago

Set SCCACHE_BASEDIRS by default for local builds again with sccache 0.20

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox163 fixed)

RESOLVED FIXED
163 Branch
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.

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.

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.

Pushed by loganrosen@gmail.com: https://github.com/mozilla-firefox/firefox/commit/9524b5d509db https://hg.mozilla.org/integration/autoland/rev/692bfc17f274 Set SCCACHE_BASEDIRS by default for local builds with sccache 0.20 or later. r=firefox-build-system-reviewers,sylvestre
Status: ASSIGNED → RESOLVED
Closed: 2 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: