From 31cdeda2edfdeddbbafeca0cdb6359546ac25cbc Mon Sep 17 00:00:00 2001 From: Earthmark Date: Mon, 23 Sep 2024 19:59:22 -0700 Subject: [PATCH] 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. --- libsqlite3-sys/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsqlite3-sys/build.rs b/libsqlite3-sys/build.rs index 6649ef7..6248e43 100644 --- a/libsqlite3-sys/build.rs +++ b/libsqlite3-sys/build.rs @@ -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