From 035ecb565cd622fa0bf200ed01e6e59fe826443a Mon Sep 17 00:00:00 2001 From: Pontus Andersson Date: Tue, 5 Nov 2024 10:35:26 +0100 Subject: [PATCH] Make have_basepri an expected cfg Since Rust 1.80 there is automatic compile-time checks for unexpected cfgs. Ensure that `have_basepri` cfg is known by the compiler emitting it in the build.rs. --- CHANGELOG.md | 2 ++ build.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d17227813a..ca7be67ee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top! ### Fixed +- CFG: Make `have_basepri` an expected cfg + ### Changed ## [v1.1.4] - 2023-02-26 diff --git a/build.rs b/build.rs index ff9ebe35e7..ac284c4ecf 100644 --- a/build.rs +++ b/build.rs @@ -7,6 +7,9 @@ fn main() { println!("cargo:rustc-cfg=rustc_is_nightly"); } + // Make `have_basepri` an expected cfg. + println!("cargo::rustc-check-cfg=cfg(have_basepri)"); + // These targets all have know support for the BASEPRI register. if target.starts_with("thumbv7m") | target.starts_with("thumbv7em")