Skip to content

Commit

Permalink
riscv-semihosting: build: use cfg-check directives in build script
Browse files Browse the repository at this point in the history
Uses new lint checks for `cfg` variables.

Requires bumping the MSRV to `1.77.0`.
  • Loading branch information
rmsyn committed May 5, 2024
1 parent ae01f6e commit eb52de3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion riscv-semihosting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ readme = "README.md"
repository = "https://github.com/riscv-rust/riscv"
version = "0.1.0"
edition = "2021"
rust-version = "1.60.0"
rust-version = "1.77.0"

[features]
u-mode = []
Expand Down
2 changes: 2 additions & 0 deletions riscv-semihosting/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::env;

fn main() {
println!("cargo::rustc-check-cfg=cfg(riscv)");

let target = env::var("TARGET").unwrap();

if target.starts_with("riscv") {
Expand Down

0 comments on commit eb52de3

Please sign in to comment.