mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-23 07:12:29 +00:00
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`.
30 lines
1.0 KiB
Rust
30 lines
1.0 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");
|
|
}
|
|
}
|