From c40990efd87e909c1b1ba4ac1587996cd6be09e2 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 14 Aug 2026 16:55:35 -0700 Subject: [PATCH] [3.12] GH-155757: Set `--argv0` for wasmtime in configure.ac (GH-155815) Set `--argv0` for wasmtime in HOSTRUNNER for configure.ac (cherry picked from commit 58c86ab1b403dba7595b83695f959b7b49e6eaa9) Co-authored-by: Brett Cannon --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a1ad0ae25101cde..451bc70442bb11d 100755 --- a/configure +++ b/configure @@ -6961,7 +6961,7 @@ fi fi ;; #( WASI/*) : - HOSTRUNNER='wasmtime run --wasm max-wasm-stack=8388608 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/' ;; #( + HOSTRUNNER='wasmtime run --argv0 /$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/python.wasm --wasm max-wasm-stack=8388608 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/' ;; #( *) : HOSTRUNNER='' ;; diff --git a/configure.ac b/configure.ac index 7b4000fa9c340d9..e7b70a83e108205 100644 --- a/configure.ac +++ b/configure.ac @@ -1580,7 +1580,7 @@ then dnl TODO: support other WASI runtimes dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the dnl directory containing _sysconfigdata to PYTHONPATH. - [WASI/*], [HOSTRUNNER='wasmtime run --wasm max-wasm-stack=8388608 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'], + [WASI/*], [HOSTRUNNER='wasmtime run --argv0 /$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/python.wasm --wasm max-wasm-stack=8388608 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'], [HOSTRUNNER=''] ) fi