rtic/build.rs

20 lines
491 B
Rust
Raw Normal View History

2017-04-06 21:06:33 +02:00
use std::env;
fn main() {
2017-04-12 06:15:05 +02:00
let target = env::var("TARGET").unwrap();
2017-07-04 18:26:11 +02:00
if target.starts_with("thumbv6m-") {
println!("cargo:rustc-cfg=armv6m");
2018-04-29 08:45:31 +02:00
} else if target.starts_with("thumbv7m-") {
println!("cargo:rustc-cfg=armv7m");
} else if target.starts_with("thumbv7em-") {
println!("cargo:rustc-cfg=armv7m");
}
if target.ends_with("-eabihf") {
println!("cargo:rustc-cfg=has_fpu");
2017-04-06 21:06:33 +02:00
}
2017-04-10 05:42:17 +02:00
println!("cargo:rerun-if-changed=build.rs");
2017-04-06 21:06:33 +02:00
}