https://github.com/python/cpython/commit/783be8cb6dc555ab9dc71a1ead85a091555c9f2a
commit: 783be8cb6dc555ab9dc71a1ead85a091555c9f2a
branch: 3.11
author: Miss Islington (bot) <[email protected]>
committer: brettcannon <[email protected]>
date: 2026-08-20T12:38:58-07:00
summary:

[3.11] GH-155757: Set `--argv0` for wasmtime in configure.ac (GH-155815) 
(#155816)

[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 <[email protected]>

files:
M configure
M configure.ac

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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to