When investigating why a particular build got a particularly high number
of cache misses, it is useful to know exactly *what* had cache misses,
and you can't get the missing information after the fact.
We used to have some stats stored in a log file uploaded as artifact
with the old python sccache per bug 1005495 (and before that inline in
the build log), and we actually still have remains of that in the form
of a EXTRA_UPLOAD_FILES in build/mozconfig.cache.
Let's reuse that, and get some useful logs from sccache. Ideally sccache
would give better logs, but those are sufficient for now. We'll figure
things out eventually. https://github.com/mozilla/sccache/issues/151
--HG--
extra : rebase_source : a2e7093697a5b720ab28f155560211d6c0a4347e
Rustc 1.20 gained support for make jobserver. But when rustc is invoked
through sccache, sccache needs to have inherited the make jobserver file
descriptor to pass it down to rustc. But what will be running sccache
first during the build is not really deterministic. It might as well end
up being a script invoking the preprocessor that ends up doing it. And
we can't add the necessary + prefix to all commands that potentially can
end up invoking sccache.
So we manually start the sccache server at the beginning of the build,
through preflight.
Note this works on automation, but not for local builds, but few people
are using sccache locally for rust (yet). Let's figure that out in a
followup.
--HG--
extra : rebase_source : eda5853d7247be247a1bec1a5d7e84b3846fd2c1
This patch does a few things:
1) Change all the in-tree tooltool manifests to contain sccache2 instead of the existing Python sccache
2) Change mozconfig.cache to point at sccache.
3) Lightly tweak the --with-cccache configure option to support sccache, and detect whether we're using ccache or sccache and set an option appropriately.
4) Add a MOZ_SCCACHE_VERBOSE_STATS option, and add a target in the top-level Makefile to make sccache spit out its stats at the end of the build. This is useful to see the cache hits/errors until we get something better.
5) Add MOZ_USING_SCCACHE to the build telemetry. Not that I think it will be immediately useful, but for future use.
MozReview-Commit-ID: 9lrdLwNj5Bm
--HG--
extra : rebase_source : d323457df10d0ee0ac5811940e518d9422a7e070