Repository navigation
Emscripten buildbot: Support multiple Emscripten versions #145177
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancement
on Feb 24, 2026 I did some preliminary work on the buildbot in preparation for this about 6 months ago, and then got distracted by other things. Thanks for picking this up again, @hoodmane.
Agreed that this is something that needs to be addressed, as it's a blocker on us bumping the Emscripten version. I don't recall if we were going to lock the Emscripten version for the
pyodide_2025_0tag at beta 1 or RC1 - but if it's beta 1, time is obviously a factor.The one question I've got about the design specification here is whether a separate file is the best way to handle version specification. Having it in a separate file isn't a huge problem to parse... but if it was a constant in the Emscripten build script to start with that you can access with
python -m emscripten --emdsk-version, doesn't that simplify the common use cases (in that it doesn't need independent file access and parsing)?On the subject of the build script - there are some other housekeeping items that I'd like to address:
cleanshould be a little more selective. It currently destroys all ofcross-build; it should only be purging the parts of cross-build that are emscripten specific (so that Emscripten, iOS and Android builds can co-exist). This is admittedly a "me" problem... but it's a problem I have :-)- The
cross-builddirectory name should be configurable. Again, this is somewhat a "me" problem... but I currently need to have cross builds for 3.10-3.15, and they can't currently co-exist. - We shouldn't be building dependencies (libFFI and mpdec) on every build. A similar caching strategy to the one described for EMSDK should be possible - look to this directory; if the cache has a build for the right emscripten version, use it rather than rebuilding.
- @brettcannon has been trying to move all the platform build tooling to the
Platformsfolder;
These issues don't necessarily need to be handled all in one PR - and I'm happy to deal with the ones that are me problems :-) However, we do want to minimize the number of changes that are needed in the buildbot configuration, and we need to be aware how the impact of changes in the interface to building will impact on the ability of the buildbot configuration to identify which Python version is being built.
a separate file is the best way to handle version specification. Having it in a separate file isn't a huge problem to parse... but if it was a constant in the Emscripten build script to start with that you can access with python -m emscripten --emdsk-version, doesn't that simplify the common use cases (in that it doesn't need independent file access and parsing)?
I don't think it matters that much, but sure I can switch to that approach.
Updated the PR.
@freakboy3742 should clean only remove
cross-build/wasm32-emscriptenand leave alonecross-build/buildfor now?The one question I've got about the design specification here is whether a separate file is the best way to handle version specification.
WASI does it in a separate file to make backports easier; you can just copy the file blindly as a backport if the per-Python variance is separate from the code.
- added a commit that references this issue
on Mar 6, 2026 - added a commit that references this issue
on Mar 8, 2026 37 remaining items
I've been able to reproduce the failure locally, and it does appear to be related to the Emscripten version update specifically. I've opened #153313 to track this.
I'll look into it. Maybe we should promote the pyrepl test to run in the GitHub action too, I don't think it takes that long.
- added a commit that references this issue
on Jul 19, 2026 - added a commit that references this issue
on Jul 26, 2026 - added a commit that references this issue
on Aug 25, 2026 - added a commit that references this issue
on Sep 2, 2026 - added a commit that references this issue
on Sep 21, 2026 - added a commit that references this issue
on Sep 22, 2026
We want to allow different branches to use different Emscripten versions. The plan is as follows:
emscripten_version.txtfile and add--emsdk-cacheargument toemscripten/__main__.py. If--emsdk-cacheis passed, the build script will require that the appropriate emsdk version is found in that directory.--emsdk-cacheargumentcc @freakboy3742
Linked PRs