Bug 1729383 - Move sccache shutdown back to client.mk. r=firefox-build-system-reviewers,mhentges

It was moved in bug 1495798 for rusttests, because they didn't use
client.mk, but as of bug 1683797, they do. And it turns out that when
sccache is really started as originally intended, inheriting the make
jobserver, the build is dead-locked until sccache quits (because sccache
still has a jobserver token for some reason). But sccache never quits
when we make it stop outside client.mk.

Differential Revision: https://phabricator.services.mozilla.com/D124728
This commit is contained in:
Mike Hommey 2021-09-08 00:10:22 +00:00
Родитель 4fa73a9662
Коммит a8480fc1c2
2 изменённых файлов: 6 добавлений и 11 удалений

Просмотреть файл

@ -69,6 +69,12 @@ build::
+$(MOZ_MAKE) automation/build
endif
ifdef MOZBUILD_MANAGE_SCCACHE_DAEMON
build::
# Terminate sccache server. This prints sccache stats.
-$(MOZBUILD_MANAGE_SCCACHE_DAEMON) --stop-server
endif
# This makefile doesn't support parallel execution. It does pass
# MOZ_MAKE_FLAGS to sub-make processes, so they will correctly execute
# in parallel.

Просмотреть файл

@ -1404,17 +1404,6 @@ items from that key's value."
self.error("setting return code to 2 because fatal was called")
self.return_code = 2
@PostScriptRun
def _shutdown_sccache(self):
"""If sccache was in use for this build, shut down the sccache server."""
if os.environ.get("USE_SCCACHE") == "1":
topsrcdir = self.query_abs_dirs()["abs_src_dir"]
sccache_base = os.environ["MOZ_FETCHES_DIR"]
sccache = os.path.join(sccache_base, "sccache", "sccache")
if self._is_windows():
sccache += ".exe"
self.run_command([sccache, "--stop-server"], cwd=topsrcdir)
@PostScriptRun
def _summarize(self):
"""If this is run in automation, ensure the return code is valid and