Closed Bug 1729383 Opened 4 years ago Closed 4 years ago

Simplify the parallel build setup

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(4 files)

No description provided.

Both work, but the former is preferred. Also remove MOZ_MAKE_FLAGS
in the mozconfig example for msan, because it's irrelevant.

It was failing on mk_add_options values containing a = character.

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.

Historically, client.mk was not invoked with -jn because it would create
race conditions, but that was actually mostly solved by the addition of
.NOTPARALLEL in bug 422986, although the mechanism of adding -jn via
MOZ_MAKE_FLAGS or MOZ_PARALLEL_BUILD has continued well past that.

Nowadays, client.mk is only invoked by mach (it will even bail out if
that's not the case) and only has one target (build) and no
dependencies.

This means we don't need to rely on MOZ_PARALLEL_BUILD to pass -jn in
some cases, and can just always invoke make -f client.mk with -jn, even
when we just want no parallelism, in which case we can use -j1.

This, in turn, allows to remove the extra allow_parallel argument to
_run_make, and only rely on num_jobs, and to remove some of the
multiple ways the n in -jn could be set.

Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/7db0160ac436 Advertize MOZ_PARALLEL_BUILD=n rather than MOZ_MAKE_FLAGS=-jn in docs. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/1f9e7de44c13 Fix the parsing of `mk_add_options` for non-make backends. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/99220b928224 Move sccache shutdown back to client.mk. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/76e8856d4005 Simplify the parallel build setup. r=firefox-build-system-reviewers,mhentges
Regressions: 1734594
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: