aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2024-06-20 20:54:41 +0200
committerDaniel García <[email protected]>2024-06-20 20:54:41 +0200
commit3fe72cafbcbd94b14b486ac3019b439f90deb2a1 (patch)
tree1e446026b5bb0e896144e7af280074321cf9791b /build.rs
parent4988e3397461d2ea087fe22d08af5dcc29bed720 (diff)
parent8f05a90b96adfe06722d01510923759fe61a8bd6 (diff)
downloadvaultwarden-3fe72cafbcbd94b14b486ac3019b439f90deb2a1.tar.gz
vaultwarden-3fe72cafbcbd94b14b486ac3019b439f90deb2a1.zip
Merge branch 'main' into remove_upcaseremove_upcase
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index e7bfb7de..07bd99a7 100644
--- a/build.rs
+++ b/build.rs
@@ -17,6 +17,13 @@ fn main() {
"You need to enable one DB backend. To build with previous defaults do: cargo build --features sqlite"
);
+ // Use check-cfg to let cargo know which cfg's we define,
+ // and avoid warnings when they are used in the code.
+ println!("cargo::rustc-check-cfg=cfg(sqlite)");
+ println!("cargo::rustc-check-cfg=cfg(mysql)");
+ println!("cargo::rustc-check-cfg=cfg(postgresql)");
+ println!("cargo::rustc-check-cfg=cfg(query_logger)");
+
// Rerun when these paths are changed.
// Someone could have checked-out a tag or specific commit, but no other files changed.
println!("cargo:rerun-if-changed=.git");