mirror of
https://github.com/isar/rusqlite.git
synced 2025-04-19 07:47:44 +08:00
commit
0278f6ea19
@ -15,7 +15,7 @@ fn win_target() -> bool {
|
||||
/// See [`win_target`]
|
||||
#[cfg(any(feature = "bundled", feature = "bundled-windows"))]
|
||||
fn android_target() -> bool {
|
||||
env::var("CARGO_CFG_TARGET_OS").map_or(false, |v| v == "android")
|
||||
env::var("CARGO_CFG_TARGET_OS").is_ok_and(|v| v == "android")
|
||||
}
|
||||
|
||||
/// Tells whether a given compiler will be used `compiler_name` is compared to
|
||||
@ -23,7 +23,7 @@ fn android_target() -> bool {
|
||||
///
|
||||
/// See [`win_target`]
|
||||
fn is_compiler(compiler_name: &str) -> bool {
|
||||
env::var("CARGO_CFG_TARGET_ENV").map_or(false, |v| v == compiler_name)
|
||||
env::var("CARGO_CFG_TARGET_ENV").is_ok_and(|v| v == compiler_name)
|
||||
}
|
||||
|
||||
/// Copy bindgen file from `dir` to `out_path`.
|
||||
@ -47,7 +47,7 @@ fn main() {
|
||||
}
|
||||
|
||||
println!("cargo:rerun-if-env-changed=LIBSQLITE3_SYS_USE_PKG_CONFIG");
|
||||
if env::var_os("LIBSQLITE3_SYS_USE_PKG_CONFIG").map_or(false, |s| s != "0")
|
||||
if env::var_os("LIBSQLITE3_SYS_USE_PKG_CONFIG").is_some_and(|s| s != "0")
|
||||
|| cfg!(feature = "loadable_extension")
|
||||
{
|
||||
build_linked::main(&out_dir, &out_path);
|
||||
@ -239,7 +239,7 @@ mod build_bundled {
|
||||
if !win_target() {
|
||||
cfg.flag("-DHAVE_LOCALTIME_R");
|
||||
}
|
||||
if env::var("TARGET").map_or(false, |v| v.starts_with("wasm32-wasi")) {
|
||||
if env::var("TARGET").is_ok_and(|v| v.starts_with("wasm32-wasi")) {
|
||||
cfg.flag("-USQLITE_THREADSAFE")
|
||||
.flag("-DSQLITE_THREADSAFE=0")
|
||||
// https://github.com/rust-lang/rust/issues/74393
|
||||
|
Loading…
x
Reference in New Issue
Block a user