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

Yhg1s <[email protected]>
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/58c86ab1b403dba7595b83695f959b7b49e6eaa9
commit: 58c86ab1b403dba7595b83695f959b7b49e6eaa9
branch: 3.12
author: Brett Cannon <[email protected]>
committer: Yhg1s <[email protected]>
date: 2026-08-15T01:55:35+02:00
summary:

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

Set `--argv0` for wasmtime in HOSTRUNNER for configure.ac

files:
M configure
M configure.ac

diff --git a/configure b/configure
index 89edc42f45c361..20a5890714923a 100755
--- a/configure
+++ b/configure
@@ -7730,7 +7730,7 @@ then :
 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 1a02d19f1b2a3f..4cbd0ae16a5a31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1604,7 +1604,7 @@ then
     dnl TODO: support other WASI runtimes
     dnl wasmtime starts the process 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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.