Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4345,6 +4345,10 @@ else
*-pc-linux-*)
CARGO_TARGET=$(echo "$host" | sed 's/-pc-linux-/-unknown-linux-/')
;;
wasm32-unknown-wasip1)
CARGO_TARGET=wasm32-wasip1
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=/opt/wasi-sdk/share/wasi-sysroot"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the WASI build script already sets WASI_SDK_PATH and WASI_SYSROOT https://github.com/Rust-for-CPython/cpython/blob/3.15-rust-in-cpython/Tools/wasm/wasi/__main__.py#L285-L286, perhaps it'd be better to just update the build.rs script to check if WASI_SYSROOT is set and add the argument there? Alternatively, you could set this environment variable in the WASI build script.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it doesn't help, the error is not in this

;;
*)
CARGO_TARGET="$host"
;;
Expand Down
Loading