diff --git a/build.rs b/build.rs index deacef538e..493ae4d5d6 100644 --- a/build.rs +++ b/build.rs @@ -13,8 +13,10 @@ fn main() -> Result<(), Box> { println!("cargo:rustc-cfg=armv7m"); } else if target.starts_with("armv7r-") { println!("cargo:rustc-cfg=armv7r"); - } else if target.starts_with("thumbv8m") { - println!("cargo:rustc-cfg=armv8m"); + } else if target.starts_with("thumbv8m.base") { + println!("cargo:rustc-cfg=armv8m_base"); + } else if target.starts_with("thumbv8m.main") { + println!("cargo:rustc-cfg=armv8m_main"); } Ok(()) diff --git a/src/pool/mod.rs b/src/pool/mod.rs index 0f508b26e7..959129e459 100644 --- a/src/pool/mod.rs +++ b/src/pool/mod.rs @@ -183,7 +183,7 @@ pub struct Pool { // NOTE: Here we lie about `Pool` implementing `Sync` on x86_64. This is not true but it lets us // test the `pool!` and `singleton::Pool` abstractions. We just have to be careful not to use the // pool in a multi-threaded context -#[cfg(any(armv7m, armv7r, armv8m, test))] +#[cfg(any(armv7m, armv7r, armv8m_main, test))] unsafe impl Sync for Pool {} unsafe impl Send for Pool {} diff --git a/src/pool/singleton.rs b/src/pool/singleton.rs index 9de9815f06..bd76630fd4 100644 --- a/src/pool/singleton.rs +++ b/src/pool/singleton.rs @@ -15,7 +15,7 @@ use as_slice::{AsMutSlice, AsSlice}; use super::{Init, Node, Uninit}; /// Instantiates a pool as a global singleton -#[cfg(any(armv7m, armv7r, armv8m, test))] +#[cfg(any(armv7m, armv7r, armv8m_main, test))] #[macro_export] macro_rules! pool { ($(#[$($attr:tt)*])* $ident:ident: $ty:ty) => {