2017-04-06 21:06:33 +02:00
|
|
|
use std::env;
|
2020-04-20 15:18:43 +02:00
|
|
|
use version_check;
|
2017-04-06 21:06:33 +02:00
|
|
|
|
|
|
|
fn main() {
|
2017-04-12 06:15:05 +02:00
|
|
|
let target = env::var("TARGET").unwrap();
|
|
|
|
|
2020-04-20 15:18:43 +02:00
|
|
|
if version_check::Channel::read().unwrap().is_nightly() {
|
|
|
|
println!("cargo:rustc-cfg=rustc_is_nightly")
|
|
|
|
}
|
|
|
|
|
2018-12-16 19:34:16 +01:00
|
|
|
if target.starts_with("thumbv6m") {
|
|
|
|
println!("cargo:rustc-cfg=armv6m")
|
|
|
|
}
|
|
|
|
|
2019-06-29 09:11:42 +02:00
|
|
|
if target.starts_with("thumbv7m")
|
|
|
|
| target.starts_with("thumbv7em")
|
|
|
|
| target.starts_with("thumbv8m")
|
|
|
|
{
|
2018-11-03 17:02:41 +01:00
|
|
|
println!("cargo:rustc-cfg=armv7m")
|
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
|
|
|
}
|