Closed Bug 1694784 Opened 7 months ago Closed 7 months ago

Switch Linux builds to using sysroots

Categories

(Firefox Build System :: Task Configuration, task)

task

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

No description provided.
Blocks: 1694785

Spidermonkey package builds don't have MOZ_AUTOMATION set (for good
reasons), which means they don't automatically get the sysroot through
MOZ_FETCHES_DIR. We need a way for that particular build to set its
sysroot.

Because the setup for sysroot is more elaborated than adding --sysroot
to C{,XX}FLAGS, it's more convenient to have an option for this.

And while at it, we might as well make that a full-fledged option,
although, we only make it available when targetting Linux (although it
could be useful for other OSes, but there's overlap with other options
on Android, and Mac, so for now, Linux-only will do).

Now that all builds are using a sysroot, they don't need a specifically
different docker image to cross-build from x86-64.

This also means we don't need to build 32-bits specific packages
anymore, so we don't need the docker image to build them either
(although in theory, we might need it if we even need to build packages
for the sysroot later on, but we'll be able to dig this out if we
actually come to that).

Subsequently, this means we don't need the debian8-i386-raw image either.

We don't need the valgrind package for the valgrind.h header anymore,
because it's in the sysroot, and we only needed the package in the build
docker image because of the header. We still do need it in the valgrind
build image, because we run valgrind in the builds using that image.

The valgrind build image Dockerfile doesn't need an update because
valgrind will be pulled through the install of valgrind-dbg that already
happens there.

Initially, they were using a debian7-amd64-build image, when linux64 were
the only 3-step PGO builds. There wasn't really a profound reason not to
use another image. Then later bug 632954 and bug 1561147 added android
and linux32, using desktop1604-test images, the test image back then,
with no rationale given as to why using different image than builds, but
there's also no reason not to use the test images.

As we're going to remove things from the build images that will probably
prevent the profiling step to run, we might as well use the test image
(now ubuntu1804-test) everywhere.

Now that all builds use sysroots, we:

  • don't need to install -dev packages,
  • don't need multi-arch packages,
  • don't need workarounds for partial multi-arch awareness,
  • however need a few packages that were installed as indirect
    dependencies.

While here, we haven't really needed autoconf2.13 since bug 1663863
(except for one job, which switched in bug 1694784)

See Also: → 1694845
Blocks: 1694889

For the record, I checked shippable linux32 and linux64 builds, and they are, as expected, identical with vs. without the sysroot (running the diffoscope tasks against unchanged linux*-shippable builds and patched linux*-reproduced builds).

Correction: for all intent and purpose, they are identical, but LLVM generated symbols for its own generated labels, so there were differences due to that.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/c1f943c83a23
Add a flag allowing to pick a sysroot manually. r=firefox-build-system-reviewers,sheehan,mhentges
https://hg.mozilla.org/integration/autoland/rev/e26c2b5cd2ce
Switch Linux builds to using sysroots. r=firefox-build-system-reviewers,andi,sheehan,mhentges
https://hg.mozilla.org/integration/autoland/rev/548cb3f5b4a9
Remove the debian8-i386-build docker image. r=firefox-build-system-reviewers,andi,mhentges,sheehan
https://hg.mozilla.org/integration/autoland/rev/1d6c269de136
Move valgrind install to the valgrind docker image. r=firefox-build-system-reviewers,andi,sheehan,mhentges
https://hg.mozilla.org/integration/autoland/rev/7343545da718
Run the linux64 PGO profiling step on the ubuntu1804-test image. r=firefox-build-system-reviewers,sheehan,mhentges
https://hg.mozilla.org/integration/autoland/rev/82523522be8c
Clean up the debian build docker images. r=firefox-build-system-reviewers,andi,mhentges
Regressions: 1696097
You need to log in before you can comment on or make changes to this bug.