Skip to content

Commit bde1291

Browse files
authored
GH-95952: Require setting HOSTRUNNER when cross compiling for WASI (#138203)
macOS by default doesn't have the requisite CLI tools to make a default value easy. Plus Tools/wasm/wasi takes care of setting HOSTRUNNER.
1 parent 92b2a8a commit bde1291

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
When cross-compiling for WASI, require that the HOSTRUNNER environment
2+
variable be explicitly set.
3+
4+
This was needed as macOS lacks the appropriate CLI tools to set a reasonable
5+
default.

configure

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,10 +1636,9 @@ then
16361636
HOSTRUNNER="$NODE"
16371637
AS_VAR_IF([host_cpu], [wasm64], [AS_VAR_APPEND([HOSTRUNNER], [" --experimental-wasm-memory64"])])
16381638
],
1639-
dnl TODO: support other WASI runtimes
1640-
dnl wasmtime starts the process with "/" as CWD. For OOT builds add the
1641-
dnl directory containing _sysconfigdata to PYTHONPATH.
1642-
[WASI], [HOSTRUNNER='wasmtime run --wasm max-wasm-stack=16777216 --wasi preview2=n --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
1639+
[WASI], [
1640+
AC_MSG_ERROR([HOSTRUNNER must be set when cross-compiling to WASI])
1641+
],
16431642
[HOSTRUNNER='']
16441643
)
16451644
fi

0 commit comments

Comments
 (0)