Closed Bug 1724522 Opened 3 years ago Closed 3 years ago

Change to wasi-sysroot bootstrapping broke wasi JS engine builds

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect

Tracking

(firefox-esr78 unaffected, firefox-esr91 unaffected, firefox91 unaffected, firefox92 wontfix, firefox93 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox91 --- unaffected
firefox92 --- wontfix
firefox93 --- fixed

People

(Reporter: till, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Bug 1722439 changed the way the wasi-sysroot is bootstrapped. This causes the JS engine not to build anymore on freshly-bootstrapped machines.

STR (tested on Ubuntu 20.04):

  1. ensure that ~/.mozbuild/wasi-sysroot doesn't exist (either by removing it, or by not having a .mozbuild directory at all)
  2. run mach bootstrap --application-choice=js
  3. run MOZ_FETCHES_DIR=~/.mozbuild js/src/devtools/automation/autospider.py wasi

Expected result: a successful wasm32-wasi build of SpiderMonkey
Actual result: wasm-ld: error: cannot open crt1.o: No such file or directory

It looks like the idea is to only have the sysroot installed when targeting wasm-sandboxing, which unfortunately doesn't cover this use case. Is there any chance to change the configure script to install the sysroot whenever the target platform is wasm32-wasi?

Flags: needinfo?(mh+mozilla)
Assignee: nobody → mh+mozilla
Flags: needinfo?(mh+mozilla)

Set release status flags based on info from the regressing bug 1722439

We don't need wasi support in versions other than the ones currently used
to build Firefox.

The wasi-sysroot toolchain contains both a sysroot for wasi and a
compiler-rt for clang. That makes it impractical to use as a
bootstrapped sysroot for wasm32-wasi builds of Spidermonkey.

We thus split the toolchain in two, one for the compiler-rt and one
for the sysroot. Ideally, the compiler-rt one would avoid building
clang/llvm the same way the sysroot one does, but that leads to
a case of chicken-and-egg, because the compiler-rt is needed to build
the clang toolchain. Eventually, the clang build would be split from
the addition of the compiler-rt, but we're not there yet.

Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/beeb98ddf00a Remove unused clang-linux64.json. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/c92fa0fa4c57 Only build clang-12 and clang-trunk with wasi-sysroot. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/a94ba4247ce9 Split wasi-sysroot in two separate toolchains. r=firefox-build-system-reviewers,mhentges https://hg.mozilla.org/integration/autoland/rev/8018783bd4b8 Auto-bootstrap the wasi sysroot for spidermonkey wasi builds. r=firefox-build-system-reviewers,mhentges
See Also: → 1725724

The patch landed in nightly and beta is affected.
:glandium, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(mh+mozilla)
Flags: needinfo?(mh+mozilla)
Has Regression Range: --- → yes
Blocks: 1758626
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: