Simplify build process for the wasi sysroot
Categories
(Firefox Build System :: Toolchains, task)
Tracking
(Not tracked)
People
(Reporter: rstewart, Unassigned)
Details
Attachments
(1 obsolete file)
As of bug 1596219 we're using the wasi-sdk github repo to construct the wasi-sysroot
. The wasi-sdk
repository is a pretty light wrapper around the llvm-project and wasi-libc repositories.
The build logic is encapsulated in the Makefile, which 1) builds a clang
with wasm32-wasi
as its default target, 2) builds the libc, 3) builds compiler-rt, 4) and builds libcxx/libcxxabi.
In principle since we already clone llvm-project
and build clang
and a bunch of the support libraries, we should be able to use our in-house clang
to construct the sysroot from these sources ourselves. Doing so would require updating the wasi-sysroot toolchain definition to pull in those sources and writing a script that emulates the contents of the Makefile
above. I attempted to do this and couldn't manage to pass the right set of command-line arguments to the build jobs to get things to work. The build errors that I ran into were all either compiler errors or really confounding linker errors that are not in my area of expertise. I'll attach a patch of the "latest version" of that attempt, which is still nonfunctional but somewhat close-ish probably a good place to start for anyone who wants to try to pick this work up.
Examples of some of the failures I encountered when trying to run various versions of this build in automation:
- This failure from this try push
- This failure from this try push
Reporter | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
See the attached revision (make sure to click "show abandoned revisions"). It doesn't work but could be a starting point for someone else wanting to pick this up.
Reporter | ||
Updated•5 years ago
|
Updated•3 years ago
|
Description
•