Skip to content

Commit

Permalink
Make have_basepri an expected cfg
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
epontan committed Nov 5, 2024
1 parent 1c5db27 commit 035ecb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 035ecb5

Please sign in to comment.