Skip to content

Commit a537aa8

Browse files
committed
riscv-semihosting: build: use cfg-check directives in build script
Uses new lint checks for `cfg` variables.
1 parent 4dd8a43 commit a537aa8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

riscv-semihosting/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55

66
## [Unreleased]
77

8+
### Changed
9+
10+
- Made `cfg` variable selection more robust for custom targets
11+
812
## [v0.1.0] - 2023-01-18
913

1014
- Add recommendation for `semihosting` in README.md.

riscv-semihosting/build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use std::env;
22

33
fn main() {
4+
println!("cargo:rustc-check-cfg=cfg(riscv)");
5+
46
let target = env::var("TARGET").unwrap();
57

68
if target.starts_with("riscv") {

0 commit comments

Comments
 (0)