Add feature flag to include wasm32-wasi-vfs.c

This commit is contained in:
Tjeu Kayim
2020-07-20 20:04:55 +02:00
committed by Thom Chiovoloni
parent 1483f1cdf5
commit 464b8283b2
3 changed files with 6 additions and 2 deletions

View File

@@ -111,10 +111,12 @@ mod build_bundled {
}
// Target wasm32-wasi can't compile the default VFS
if env::var("TARGET") == Ok("wasm32-wasi".to_string()) {
cfg.file("sqlite3/wasm32-wasi-vfs.c")
.flag("-DSQLITE_OS_OTHER")
cfg.flag("-DSQLITE_OS_OTHER")
// https://github.com/rust-lang/rust/issues/74393
.flag("-DLONGDOUBLE_TYPE=double");
if cfg!(feature = "wasm32-wasi-vfs") {
cfg.file("sqlite3/wasm32-wasi-vfs.c");
}
}
if cfg!(feature = "unlock_notify") {
cfg.flag("-DSQLITE_ENABLE_UNLOCK_NOTIFY");