From 42a82c33ef0eb896a54d8bad01767eb7c14f7c9b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 26 Sep 2024 17:05:34 -0700 Subject: [PATCH 1/4] Limit non-debug WASI builds to 3.11 and 3.12 It's when WASI was tier 3 and the files in `Tools/wasm` used for the build are removed in 3.14. --- master/master.cfg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/master/master.cfg b/master/master.cfg index 8adefdf3..6c019bbe 100644 --- a/master/master.cfg +++ b/master/master.cfg @@ -239,9 +239,13 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches): # Only 3.11+ for WebAssembly builds if "wasm" in tags: + # WASM wasn't a supported platform until 3.11. if branchname in {"3.9", "3.10"}: continue - # Pydebug support is 3.13+ + # Tier 3 support is 3.11 & 3.12. + elif "nondebug" in tags and branchname not in {"3.11", "3.12"}: + continue + # Tier 2 support is 3.13+. elif "nondebug" not in tags and branchname in {"3.11", "3.12"}: continue From 09bbce64fdb5b879fc1afa70a08714f60a0191eb Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 7 Nov 2024 14:22:27 -0800 Subject: [PATCH 2/4] Make the buildbot config for WASI explicitly set the target triple --- master/custom/factories.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index 991a6172..d8ecadf1 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -873,7 +873,8 @@ def __init__(self, source, *, extra_tags=[], **kwargs): def setup(self, parallel, branch, test_with_PTY=False, **kwargs): wasi_py = "Tools/wasm/wasi.py" - host_path = "build/cross-build/wasm32-wasi" + host_triple = "wasm32-wasip1" + host_path = f"build/cross-build/{host_triple}" # Build Python build_configure = ["python3", wasi_py, "configure-build-python"] @@ -897,13 +898,13 @@ def setup(self, parallel, branch, test_with_PTY=False, **kwargs): # Pydebug build automatically inferred from build Python. Configure( name="Configure host Python", - command=["python3", wasi_py, "configure-host"], + command=["python3", wasi_py, "configure-host", "--target-triple", host_triple], ) ) self.addStep( Compile( name="Compile host Python", - command=["python3", wasi_py, "make-host"], + command=["python3", wasi_py, "make-host", "--target-triple", host_triple], ) ) From 11cd06ba3ede03b0ed91099d02a22cdb3e0ba184 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 7 Nov 2024 14:58:18 -0800 Subject: [PATCH 3/4] Go back to using defaults --- master/custom/factories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index 637832ed..0d9d7624 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -911,13 +911,13 @@ def setup(self, parallel, branch, test_with_PTY=False, **kwargs): # Pydebug build automatically inferred from build Python. Configure( name="Configure host Python", - command=["python3", wasi_py, "configure-host", "--target-triple", host_triple], + command=["python3", wasi_py, "configure-host"], ) ) self.addStep( Compile( name="Compile host Python", - command=["python3", wasi_py, "make-host", "--target-triple", host_triple], + command=["python3", wasi_py, "make-host"], ) ) From 132e34313000e396a420af8feb30f2343a643248 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 7 Nov 2024 15:02:12 -0800 Subject: [PATCH 4/4] Brand everything as being for WASI preview1 --- master/custom/builders.py | 4 ++-- master/custom/factories.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/master/custom/builders.py b/master/custom/builders.py index 4956d2b4..9d5822c1 100644 --- a/master/custom/builders.py +++ b/master/custom/builders.py @@ -43,7 +43,7 @@ WindowsARM64Build, WindowsARM64ReleaseBuild, Wasm32WasiCrossBuild, - Wasm32WasiDebugBuild, + Wasm32WasiPreview1DebugBuild, IOSARM64SimulatorBuild, AndroidBuild, ValgrindBuild, @@ -133,7 +133,7 @@ # WASI ("wasm32-wasi Non-Debug", "bcannon-wasi", Wasm32WasiCrossBuild), - ("wasm32-wasi", "bcannon-wasi", Wasm32WasiDebugBuild), + ("wasm32-wasi", "bcannon-wasi", Wasm32WasiPreview1DebugBuild), ] diff --git a/master/custom/factories.py b/master/custom/factories.py index 0d9d7624..6d6bb87c 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -872,7 +872,7 @@ def setup(self, parallel, branch, test_with_PTY=False, **kwargs): super().setup(parallel, branch, test_with_PTY=test_with_PTY, **kwargs) -class _Wasm32WasiBuild(UnixBuild): +class _Wasm32WasiPreview1Build(UnixBuild): """Build Python for wasm32-wasi using Tools/wasm/wasi.py.""" buildersuffix = ".wasi" factory_tags = ["wasm", "wasi"] @@ -969,7 +969,7 @@ def setup(self, parallel, branch, test_with_PTY=False, **kwargs): # Preventing this from running on versions older than 3.13 is managed in # master.cfg. -class Wasm32WasiDebugBuild(_Wasm32WasiBuild): +class Wasm32WasiPreview1DebugBuild(_Wasm32WasiPreview1Build): append_suffix = ".debug" pydebug = True testFlags = ["-u-cpu"]