Pre-release wasi targets not enabling wasi flags properly in bundled mode.

wasm32-wasi is being deprecated in favor of pre-release targets like `wasm32-wasip\d`.

This instead matches the prefix wasi target, so any future pre-releases will probably, maybe work out of the box.
This commit is contained in:
Earthmark 2024-09-23 19:59:22 -07:00
parent 95680270ec
commit 31cdeda2ed
No known key found for this signature in database
GPG Key ID: 0AD51DB7EF20713C

View File

@ -239,7 +239,7 @@ mod build_bundled {
if !win_target() {
cfg.flag("-DHAVE_LOCALTIME_R");
}
if env::var("TARGET").map_or(false, |v| v == "wasm32-wasi") {
if env::var("TARGET").map_or(false, |v| v.starts_with("wasm32-wasi")) {
cfg.flag("-USQLITE_THREADSAFE")
.flag("-DSQLITE_THREADSAFE=0")
// https://github.com/rust-lang/rust/issues/74393