mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.11] GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives (GH-116327) (GH-116373) (GH-116384)
(cherry picked from commit 88fdb082d9
)
This commit is contained in:
parent
8675e7f853
commit
4637a1fcbd
4 changed files with 7 additions and 4 deletions
|
@ -0,0 +1 @@
|
||||||
|
Get WASI builds to work under wasmtime 18 w/ WASI 0.2/preview2 primitives.
|
|
@ -316,8 +316,10 @@ WASI = Platform(
|
||||||
# workaround for https://github.com/python/cpython/issues/95952
|
# workaround for https://github.com/python/cpython/issues/95952
|
||||||
"HOSTRUNNER": (
|
"HOSTRUNNER": (
|
||||||
"wasmtime run "
|
"wasmtime run "
|
||||||
"--env PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib "
|
"--wasm max-wasm-stack=8388608 "
|
||||||
"--mapdir /::{srcdir} --"
|
"--wasi preview2 "
|
||||||
|
"--dir {srcdir}::/ "
|
||||||
|
"--env PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib"
|
||||||
),
|
),
|
||||||
"PATH": [WASI_SDK_PATH / "bin", os.environ["PATH"]],
|
"PATH": [WASI_SDK_PATH / "bin", os.environ["PATH"]],
|
||||||
},
|
},
|
||||||
|
|
2
configure
generated
vendored
2
configure
generated
vendored
|
@ -6961,7 +6961,7 @@ fi
|
||||||
fi
|
fi
|
||||||
;; #(
|
;; #(
|
||||||
WASI/*) :
|
WASI/*) :
|
||||||
HOSTRUNNER='wasmtime run --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt) --mapdir /::$(srcdir) --' ;; #(
|
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=''
|
HOSTRUNNER=''
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1580,7 +1580,7 @@ then
|
||||||
dnl TODO: support other WASI runtimes
|
dnl TODO: support other WASI runtimes
|
||||||
dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the
|
dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the
|
||||||
dnl directory containing _sysconfigdata to PYTHONPATH.
|
dnl directory containing _sysconfigdata to PYTHONPATH.
|
||||||
[WASI/*], [HOSTRUNNER='wasmtime run --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt) --mapdir /::$(srcdir) --'],
|
[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='']
|
[HOSTRUNNER='']
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue