Add build.rs to detect armv6
This commit is contained in:
parent
776be79f7b
commit
f1f90b17b5
11
embassy-boot/stm32/build.rs
Normal file
11
embassy-boot/stm32/build.rs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
use std::env;
|
||||||
|
use std::fs::File;
|
||||||
|
use std::io::Write;
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let target = env::var("TARGET").unwrap();
|
||||||
|
if target.starts_with("thumbv6m-") {
|
||||||
|
println!("cargo:rustc-cfg=armv6m");
|
||||||
|
}
|
||||||
|
}
|
@ -24,9 +24,4 @@ fn main() {
|
|||||||
if env::var("CARGO_FEATURE_DEFMT").is_ok() {
|
if env::var("CARGO_FEATURE_DEFMT").is_ok() {
|
||||||
println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
|
println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
|
||||||
}
|
}
|
||||||
|
|
||||||
let target = env::var("TARGET").unwrap();
|
|
||||||
if target.starts_with("thumbv6m-") {
|
|
||||||
println!("cargo:rustc-cfg=armv6m");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit fa294eae79c0f33f4cde1e73b4e69db59f7429e3
|
Subproject commit 56d5b8b2aee7026b4f9bcffc427bb8f9d48afeb5
|
Loading…
Reference in New Issue
Block a user