From a6b7888040967fe6e592493571bb25966940d6eb Mon Sep 17 00:00:00 2001 From: Johannes Cornelis Draaijer Date: Wed, 5 Aug 2026 17:49:26 +0200 Subject: [PATCH] cortex-m: don't gate off modules for native target These modules only contain `asm_cfg`s that explicitly exist to allow for compilation (but not function) on native targets. Gating the modules behind target features makes this impossible (requiring workarounds on the end of the cortex-m consumer). The modules should also be made available when compiling for the host target. Fixes #680 --- cortex-m/src/register/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cortex-m/src/register/mod.rs b/cortex-m/src/register/mod.rs index 8c1b24e4..d8a296fb 100644 --- a/cortex-m/src/register/mod.rs +++ b/cortex-m/src/register/mod.rs @@ -30,15 +30,15 @@ //! //! - Cortex-M* Devices Generic User Guide - Section 2.1.3 Core registers -#[cfg(any(armv7m, armv8m_main))] +#[cfg(any(armv7m, armv8m_main, native))] pub mod basepri; -#[cfg(any(armv7m, armv8m_main))] +#[cfg(any(armv7m, armv8m_main, native))] pub mod basepri_max; pub mod control; -#[cfg(any(armv7m, armv8m_main))] +#[cfg(any(armv7m, armv8m_main, native))] pub mod faultmask; #[cfg(has_fpu)]