From a68e1cc9848ee15b37b55b0e7cede86f02f758ad Mon Sep 17 00:00:00 2001 From: Larry Dewey Date: Wed, 31 Jul 2024 10:34:24 -0500 Subject: [PATCH] build: Fixing linting issue for build.rs Previously we were not registering the custom flags for rustc to check. Adding these two lines fixes a bunch of linting issues Signed-off-by: Larry Dewey --- build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.rs b/build.rs index f2e6c85e..a87bb690 100644 --- a/build.rs +++ b/build.rs @@ -3,6 +3,11 @@ fn main() { use std::path::Path; + // Register custom cfg flags for `has_sev` and `has_sev_guest`. + println!("cargo:rustc-check-cfg=cfg(has_sev)"); + println!("cargo:rustc-check-cfg=cfg(has_sev_guest)"); + + // If the device driver is found, set the cfg flag if cfg!(feature = "hw_tests") || Path::new("/dev/sev").exists() { println!("cargo:rustc-cfg=has_sev"); }