5085100df2
- Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`. - Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore) - Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
29 lines
1 KiB
Rust
29 lines
1 KiB
Rust
use std::env;
|
|
|
|
fn main() {
|
|
let target = env::var("TARGET").unwrap();
|
|
|
|
if target.starts_with("thumbv6m-") {
|
|
println!("cargo:rustc-cfg=cortex_m");
|
|
println!("cargo:rustc-cfg=armv6m");
|
|
} else if target.starts_with("thumbv7m-") {
|
|
println!("cargo:rustc-cfg=cortex_m");
|
|
println!("cargo:rustc-cfg=armv7m");
|
|
} else if target.starts_with("thumbv7em-") {
|
|
println!("cargo:rustc-cfg=cortex_m");
|
|
println!("cargo:rustc-cfg=armv7m");
|
|
println!("cargo:rustc-cfg=armv7em"); // (not currently used)
|
|
} else if target.starts_with("thumbv8m.base") {
|
|
println!("cargo:rustc-cfg=cortex_m");
|
|
println!("cargo:rustc-cfg=armv8m");
|
|
println!("cargo:rustc-cfg=armv8m_base");
|
|
} else if target.starts_with("thumbv8m.main") {
|
|
println!("cargo:rustc-cfg=cortex_m");
|
|
println!("cargo:rustc-cfg=armv8m");
|
|
println!("cargo:rustc-cfg=armv8m_main");
|
|
}
|
|
|
|
if target.ends_with("-eabihf") {
|
|
println!("cargo:rustc-cfg=has_fpu");
|
|
}
|
|
}
|