From 1696a64bd74e48759b0f4a833667ddad31ad86ac Mon Sep 17 00:00:00 2001 From: "U. Lasiotus" Date: Fri, 17 Jul 2026 18:49:29 -0700 Subject: [PATCH] Support Motor OS (noop otherwise) This noop change makes stacker compile for Motor OS target (see https://doc.rust-lang.org/rustc/platform-support/motor.html) Signed-off-by: U. Lasiotus --- Cargo.toml | 5 +++++ src/lib.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 149b9aa..acc2b00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,3 +44,8 @@ features = [ [build-dependencies] cc = "1.2.33" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(target_os, values("motor"))', +] } diff --git a/src/lib.rs b/src/lib.rs index 3a7c898..3f78fc5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,11 +135,11 @@ fn set_stack_limit(l: Option) { psm_stack_manipulation! { yes { - #[cfg(not(any(target_arch = "wasm32",target_os = "hermit")))] + #[cfg(not(any(target_arch = "wasm32",target_os = "hermit", target_os = "motor")))] #[path = "mmap_stack_restore_guard.rs"] mod stack_restore_guard; - #[cfg(any(target_arch = "wasm32",target_os = "hermit"))] + #[cfg(any(target_arch = "wasm32",target_os = "hermit", target_os = "motor"))] #[path = "alloc_stack_restore_guard.rs"] mod stack_restore_guard;