From f589f263bcb54332e47bfc76cbb06f775e82b778 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 16 Jul 2024 13:00:39 -0700 Subject: [PATCH] GH-120371: Add WASI SDK 22 support (GH-121870) Required disabling stub functions now provided by wasi-libc. --- .devcontainer/Dockerfile | 2 +- .github/workflows/reusable-wasi.yml | 2 +- .../Build/2024-07-16-12-29-54.gh-issue-120371.E7x858.rst | 2 ++ Tools/wasm/config.site-wasm32-wasi | 8 ++++++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2024-07-16-12-29-54.gh-issue-120371.E7x858.rst diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 98ab4008bed..a4ada1b66bf 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,7 +2,7 @@ FROM docker.io/library/fedora:40 ENV CC=clang -ENV WASI_SDK_VERSION=21 +ENV WASI_SDK_VERSION=22 ENV WASI_SDK_PATH=/opt/wasi-sdk ENV WASMTIME_HOME=/opt/wasmtime diff --git a/.github/workflows/reusable-wasi.yml b/.github/workflows/reusable-wasi.yml index db6c04ec2ac..ffa143b3457 100644 --- a/.github/workflows/reusable-wasi.yml +++ b/.github/workflows/reusable-wasi.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 env: WASMTIME_VERSION: 22.0.0 - WASI_SDK_VERSION: 21 + WASI_SDK_VERSION: 22 WASI_SDK_PATH: /opt/wasi-sdk CROSS_BUILD_PYTHON: cross-build/build CROSS_BUILD_WASI: cross-build/wasm32-wasi diff --git a/Misc/NEWS.d/next/Build/2024-07-16-12-29-54.gh-issue-120371.E7x858.rst b/Misc/NEWS.d/next/Build/2024-07-16-12-29-54.gh-issue-120371.E7x858.rst new file mode 100644 index 00000000000..d57266dafd8 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2024-07-16-12-29-54.gh-issue-120371.E7x858.rst @@ -0,0 +1,2 @@ +Support WASI SDK 22 by explicitly skipping functions that are just stubs in +wasi-libc. diff --git a/Tools/wasm/config.site-wasm32-wasi b/Tools/wasm/config.site-wasm32-wasi index 4a1a466a4ab..c5d8b3e205d 100644 --- a/Tools/wasm/config.site-wasm32-wasi +++ b/Tools/wasm/config.site-wasm32-wasi @@ -49,3 +49,11 @@ ac_cv_func_preadv=no ac_cv_func_readv=no ac_cv_func_pwritev=no ac_cv_func_writev=no + +# WASI SDK 22 added multiple stubs which we don't implement. +# https://github.com/python/cpython/issues/120371 +ac_cv_func_chmod=no +ac_cv_func_fchmod=no +ac_cv_func_fchmodat=no +ac_cv_func_statvfs=no +ac_cv_func_fstatvfs=no