Skip to content

Commit 06ba5f4

Browse files
authored
[3.12] GH-155757: Set --argv0 for wasmtime (#155758)
1 parent dc9697f commit 06ba5f4

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Set the ``--argv0`` argument to wasmtime for WASI builds so the test suite
2+
passes. Otherwise the calculated paths to the stdlib for frozen modules is
3+
incorrect.

Tools/wasm/wasm_build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def _check_wasi():
318318
"wasmtime run "
319319
"--wasm max-wasm-stack=8388608 "
320320
"--wasi preview2 "
321+
"--argv0 /{relbuilddir}/python.wasm "
321322
"--dir {srcdir}::/ "
322323
"--env PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib"
323324
),

0 commit comments

Comments
 (0)