diff --git a/src/lib.rs b/src/lib.rs index 5621b38..a86f3ff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,8 +37,12 @@ pub(crate) mod naked; #[cfg(all(feature = "unwinding", not(target_arch = "arm")))] #[allow(unused_extern_crates)] extern crate unwinding; -#[cfg(all(feature = "unwinding", target_arch = "arm"))] +#[cfg(any(not(feature = "unwinding"), target_arch = "arm"))] mod unwind_unimplemented; +// If we don't have "unwinding", provide stub functions for unwinding and +// panicking. +#[cfg(not(feature = "unwinding"))] +mod stubs; #[cfg_attr(target_arch = "aarch64", path = "arch/aarch64.rs")] #[cfg_attr(target_arch = "x86_64", path = "arch/x86_64.rs")] @@ -66,11 +70,6 @@ pub mod signal; #[cfg_attr(not(feature = "take-charge"), path = "thread/libc.rs")] pub mod thread; -// If we don't have "unwinding", provide stub functions for unwinding and -// panicking. -#[cfg(not(feature = "unwinding"))] -mod stubs; - // Include definitions of `memcpy` and other functions called from LLVM // Codegen. Normally, these would be defined by the platform libc, however with // origin with `take-charge`, there is no libc. Otherwise normally, these