From 4620d015643f52ab6fdc084aaf4b9294428fafba Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 14 Aug 2026 15:08:58 -0700 Subject: [PATCH] Set `--argv0` for wasmtime in HOSTRUNNER for configure.ac --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 89edc42f45c361c..20a5890714923a0 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 1a02d19f1b2a3fa..4cbd0ae16a5a31a 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