Skip to content

Commit 9ecaee6

Browse files
authored
[3.13] GH-123877: make wasm32-wasip1 the target triple for WASI (#126561)
1 parent 9ab3d31 commit 9ecaee6

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.github/workflows/reusable-wasi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
WASI_SDK_VERSION: 24
1818
WASI_SDK_PATH: /opt/wasi-sdk
1919
CROSS_BUILD_PYTHON: cross-build/build
20-
CROSS_BUILD_WASI: cross-build/wasm32-wasi
20+
CROSS_BUILD_WASI: cross-build/wasm32-wasip1
2121
steps:
2222
- uses: actions/checkout@v4
2323
# No problem resolver registered as one doesn't currently exist for Clang.
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
path: ${{ env.WASI_SDK_PATH }}
3333
key: ${{ runner.os }}-wasi-sdk-${{ env.WASI_SDK_VERSION }}
34-
- name: "Install WASI SDK"
34+
- name: "Install WASI SDK" # Hard-coded to x64.
3535
if: steps.cache-wasi-sdk.outputs.cache-hit != 'true'
3636
run: |
3737
mkdir ${{ env.WASI_SDK_PATH }} && \
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Set ``wasm32-wasip1`` as the WASI target. The old ``wasm32-wasi`` target is
2+
deprecated so it can be used for an eventual WASI 1.0.

Tools/wasm/wasi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def main():
347347
"(default designed for wasmtime 14 or newer: "
348348
f"`{default_host_runner}`)")
349349
for subcommand in build, configure_host, make_host:
350-
subcommand.add_argument("--host-triple", action="store", default="wasm32-wasi",
350+
subcommand.add_argument("--host-triple", action="store", default="wasm32-wasip1",
351351
help="The target triple for the WASI host build")
352352

353353
context = parser.parse_args()

configure

Lines changed: 3 additions & 3 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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ then
336336
*-*-emscripten)
337337
ac_sys_system=Emscripten
338338
;;
339-
*-*-wasi)
339+
*-*-wasi*)
340340
ac_sys_system=WASI
341341
;;
342342
*)
@@ -1181,7 +1181,7 @@ AS_CASE([$host/$ac_cv_cc_name],
11811181
[aarch64-*-linux-gnu/gcc], [PY_SUPPORT_TIER=2], dnl Linux ARM64, glibc, gcc+clang
11821182
[aarch64-*-linux-gnu/clang], [PY_SUPPORT_TIER=2],
11831183
[powerpc64le-*-linux-gnu/gcc], [PY_SUPPORT_TIER=2], dnl Linux on PPC64 little endian, glibc, gcc
1184-
[wasm32-unknown-wasi/clang], [PY_SUPPORT_TIER=2], dnl WebAssembly System Interface, clang
1184+
[wasm32-unknown-wasip1/clang], [PY_SUPPORT_TIER=2], dnl WebAssembly System Interface preview1, clang
11851185
[x86_64-*-linux-gnu/clang], [PY_SUPPORT_TIER=2], dnl Linux on AMD64, any vendor, glibc, clang
11861186

11871187
[aarch64-pc-windows-msvc/msvc], [PY_SUPPORT_TIER=3], dnl Windows ARM64, MSVC
@@ -1655,7 +1655,7 @@ then
16551655
dnl TODO: support other WASI runtimes
16561656
dnl wasmtime starts the process with "/" as CWD. For OOT builds add the
16571657
dnl directory containing _sysconfigdata to PYTHONPATH.
1658-
[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)::/'],
1658+
[WASI/*], [HOSTRUNNER='wasmtime run --wasm max-wasm-stack=8388608 --wasi preview2=n --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
16591659
[HOSTRUNNER='']
16601660
)
16611661
fi

0 commit comments

Comments
 (0)