Merge pull request #1569 from Earthmark/earthmark/wasi_build

Fixed pre-release `wasm32-wasip(\d)` targets not enabling wasi compile flags in `bundled` mode.
This commit is contained in:
gwenn 2024-10-05 15:09:12 +02:00 committed by GitHub
commit 4d8b8e71cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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