diff --git a/crates/examples/root-task/spawn-task/child/Cargo.nix b/crates/examples/root-task/spawn-task/child/Cargo.nix index 8f8b27edf..946e8c73e 100644 --- a/crates/examples/root-task/spawn-task/child/Cargo.nix +++ b/crates/examples/root-task/spawn-task/child/Cargo.nix @@ -18,10 +18,10 @@ mk { sel4-ctors-dtors ; sel4-panicking = localCrates.sel4-panicking // { - features = [ "unwinding" "alloc" ]; + features = [ "alloc" ]; }; sel4-runtime-common = localCrates.sel4-runtime-common // { - features = [ "start" "tls" "unwinding" ]; + features = [ "start" "tls" ]; }; }; } diff --git a/crates/examples/root-task/spawn-task/child/Cargo.toml b/crates/examples/root-task/spawn-task/child/Cargo.toml index 7893be300..a5ce979c7 100644 --- a/crates/examples/root-task/spawn-task/child/Cargo.toml +++ b/crates/examples/root-task/spawn-task/child/Cargo.toml @@ -21,10 +21,7 @@ cfg-if = "1.0.0" sel4 = { path = "../../../../sel4" } sel4-ctors-dtors = { path = "../../../../sel4-ctors-dtors" } sel4-dlmalloc = { path = "../../../../sel4-dlmalloc" } -sel4-panicking = { path = "../../../../sel4-panicking", features = ["unwinding", "alloc"] } +sel4-panicking = { path = "../../../../sel4-panicking", features = ["alloc"] } sel4-panicking-env = { path = "../../../../sel4-panicking/env" } +sel4-runtime-common = { path = "../../../../sel4-runtime-common", features = ["start", "tls"] } sel4-sync = { path = "../../../../sel4-sync" } - -[dependencies.sel4-runtime-common] -path = "../../../../sel4-runtime-common" -features = ["start", "tls", "unwinding"] diff --git a/crates/private/support/sel4-root-task-with-std/Cargo.nix b/crates/private/support/sel4-root-task-with-std/Cargo.nix index 8bbab8766..51012f1a2 100644 --- a/crates/private/support/sel4-root-task-with-std/Cargo.nix +++ b/crates/private/support/sel4-root-task-with-std/Cargo.nix @@ -14,7 +14,7 @@ mk { sel4-panicking-env sel4-ctors-dtors ; - sel4-runtime-common = localCrates.sel4-runtime-common // { features = [ "start" "tls" "unwinding" ]; }; + sel4-runtime-common = localCrates.sel4-runtime-common // { features = [ "start" "tls" ]; }; }; features = { single-threaded = [ diff --git a/crates/private/support/sel4-root-task-with-std/Cargo.toml b/crates/private/support/sel4-root-task-with-std/Cargo.toml index 156804457..d2602d88e 100644 --- a/crates/private/support/sel4-root-task-with-std/Cargo.toml +++ b/crates/private/support/sel4-root-task-with-std/Cargo.toml @@ -23,7 +23,4 @@ single-threaded = ["sel4/single-threaded"] sel4 = { path = "../../../sel4" } sel4-ctors-dtors = { path = "../../../sel4-ctors-dtors" } sel4-panicking-env = { path = "../../../sel4-panicking/env" } - -[dependencies.sel4-runtime-common] -path = "../../../sel4-runtime-common" -features = ["start", "tls", "unwinding"] +sel4-runtime-common = { path = "../../../sel4-runtime-common", features = ["start", "tls"] } diff --git a/crates/private/support/sel4-simple-task/runtime/Cargo.nix b/crates/private/support/sel4-simple-task/runtime/Cargo.nix index f16bb44da..c9529f9e1 100644 --- a/crates/private/support/sel4-simple-task/runtime/Cargo.nix +++ b/crates/private/support/sel4-simple-task/runtime/Cargo.nix @@ -25,7 +25,7 @@ mk { sel4-sync sel4-ctors-dtors ; - sel4-runtime-common = localCrates.sel4-runtime-common // { features = [ "tls" "unwinding" ]; }; + sel4-runtime-common = localCrates.sel4-runtime-common // { features = [ "tls" ]; }; }; target."cfg(not(target_arch = \"arm\"))".dependencies = { sel4-backtrace = localCrates.sel4-backtrace // { features = [ "unwinding" "postcard" ]; }; diff --git a/crates/private/support/sel4-simple-task/runtime/Cargo.toml b/crates/private/support/sel4-simple-task/runtime/Cargo.toml index bfef318ba..cb8279f9a 100644 --- a/crates/private/support/sel4-simple-task/runtime/Cargo.toml +++ b/crates/private/support/sel4-simple-task/runtime/Cargo.toml @@ -34,7 +34,7 @@ sel4-dlmalloc = { path = "../../../../sel4-dlmalloc" } sel4-immediate-sync-once-cell = { path = "../../../../sel4-immediate-sync-once-cell" } sel4-panicking = { path = "../../../../sel4-panicking" } sel4-panicking-env = { path = "../../../../sel4-panicking/env" } -sel4-runtime-common = { path = "../../../../sel4-runtime-common", features = ["tls", "unwinding"] } +sel4-runtime-common = { path = "../../../../sel4-runtime-common", features = ["tls"] } sel4-simple-task-runtime-config-types = { path = "config/types" } sel4-simple-task-runtime-macros = { path = "macros" } sel4-simple-task-threading = { path = "../threading" } diff --git a/crates/private/tests/root-task/backtrace/Cargo.nix b/crates/private/tests/root-task/backtrace/Cargo.nix index dce1b6d3d..27b2b2f2b 100644 --- a/crates/private/tests/root-task/backtrace/Cargo.nix +++ b/crates/private/tests/root-task/backtrace/Cargo.nix @@ -13,7 +13,7 @@ mk { sel4 sel4-backtrace-embedded-debug-info ; - sel4-root-task = localCrates.sel4-root-task // { features = [ "unwinding" "alloc" ]; }; + sel4-root-task = localCrates.sel4-root-task // { features = [ "alloc" ]; }; sel4-backtrace-simple = localCrates.sel4-backtrace-simple // { features = [ "alloc" ]; }; sel4-backtrace = localCrates.sel4-backtrace // { features = [ "full" ]; }; sel4-backtrace-types = localCrates.sel4-backtrace-types // { features = [ "full" ]; }; diff --git a/crates/private/tests/root-task/backtrace/Cargo.toml b/crates/private/tests/root-task/backtrace/Cargo.toml index 5c2ed7e31..5f5eaae57 100644 --- a/crates/private/tests/root-task/backtrace/Cargo.toml +++ b/crates/private/tests/root-task/backtrace/Cargo.toml @@ -22,4 +22,4 @@ sel4-backtrace = { path = "../../../../sel4-backtrace", features = ["full"] } sel4-backtrace-embedded-debug-info = { path = "../../../../sel4-backtrace/embedded-debug-info" } sel4-backtrace-simple = { path = "../../../../sel4-backtrace/simple", features = ["alloc"] } sel4-backtrace-types = { path = "../../../../sel4-backtrace/types", features = ["full"] } -sel4-root-task = { path = "../../../../sel4-root-task", features = ["unwinding", "alloc"] } +sel4-root-task = { path = "../../../../sel4-root-task", features = ["alloc"] } diff --git a/crates/private/tests/root-task/panicking/Cargo.nix b/crates/private/tests/root-task/panicking/Cargo.nix index 0274f9e0b..202846dcf 100644 --- a/crates/private/tests/root-task/panicking/Cargo.nix +++ b/crates/private/tests/root-task/panicking/Cargo.nix @@ -12,8 +12,8 @@ mk { inherit (versions) cfg-if; inherit (localCrates) sel4 + sel4-root-task ; - sel4-root-task = localCrates.sel4-root-task // { features = [ "unwinding" ]; }; }; features = { alloc = [ "sel4-root-task/alloc" ]; diff --git a/crates/private/tests/root-task/panicking/Cargo.toml b/crates/private/tests/root-task/panicking/Cargo.toml index 5c72c85eb..839d05cbc 100644 --- a/crates/private/tests/root-task/panicking/Cargo.toml +++ b/crates/private/tests/root-task/panicking/Cargo.toml @@ -24,4 +24,4 @@ panic-unwind = [] [dependencies] cfg-if = "1.0.0" sel4 = { path = "../../../../sel4" } -sel4-root-task = { path = "../../../../sel4-root-task", features = ["unwinding"] } +sel4-root-task = { path = "../../../../sel4-root-task" } diff --git a/crates/sel4-microkit/Cargo.nix b/crates/sel4-microkit/Cargo.nix index 7297fbd03..0d9efd2e1 100644 --- a/crates/sel4-microkit/Cargo.nix +++ b/crates/sel4-microkit/Cargo.nix @@ -25,13 +25,8 @@ mk { }; features = { full = [ - "unwinding" "alloc" ]; - unwinding = [ - "sel4-panicking/unwinding" - "sel4-runtime-common/unwinding" - ]; alloc = [ "sel4-panicking/alloc" ]; diff --git a/crates/sel4-microkit/Cargo.toml b/crates/sel4-microkit/Cargo.toml index 692ae61e6..cc9f0563b 100644 --- a/crates/sel4-microkit/Cargo.toml +++ b/crates/sel4-microkit/Cargo.toml @@ -18,8 +18,7 @@ license = "BSD-2-Clause" [features] alloc = ["sel4-panicking/alloc"] -full = ["unwinding", "alloc"] -unwinding = ["sel4-panicking/unwinding", "sel4-runtime-common/unwinding"] +full = ["alloc"] [dependencies] cfg-if = "1.0.0" diff --git a/crates/sel4-microkit/src/entry.rs b/crates/sel4-microkit/src/entry.rs index 5619e15cd..112f68bbf 100644 --- a/crates/sel4-microkit/src/entry.rs +++ b/crates/sel4-microkit/src/entry.rs @@ -30,7 +30,7 @@ unsafe extern "C" fn sel4_runtime_rust_entry() -> ! { #[allow(unreachable_code)] fn inner_entry() -> ! { - #[cfg(all(feature = "unwinding", panic = "unwind"))] + #[cfg(panic = "unwind")] { sel4_runtime_common::set_eh_frame_finder().unwrap(); } diff --git a/crates/sel4-panicking/Cargo.nix b/crates/sel4-panicking/Cargo.nix index 5b9e8bd8f..36ea86f7d 100644 --- a/crates/sel4-panicking/Cargo.nix +++ b/crates/sel4-panicking/Cargo.nix @@ -18,8 +18,8 @@ mk { build-dependencies = { inherit (versions) rustc_version; }; - target."cfg(not(target_arch = \"arm\"))".dependencies = { - unwinding = unwindingWith [ "personality" ] // { optional = true; }; + target."cfg(all(panic = \"unwind\", not(target_arch = \"arm\")))".dependencies = { + unwinding = unwindingWith [ "personality" ]; }; features = { alloc = []; diff --git a/crates/sel4-panicking/Cargo.toml b/crates/sel4-panicking/Cargo.toml index d259c8a7c..42df92319 100644 --- a/crates/sel4-panicking/Cargo.toml +++ b/crates/sel4-panicking/Cargo.toml @@ -27,8 +27,7 @@ sel4-panicking-env = { path = "env" } [build-dependencies] rustc_version = "0.4.0" -[target."cfg(not(target_arch = \"arm\"))".dependencies.unwinding] +[target."cfg(all(panic = \"unwind\", not(target_arch = \"arm\")))".dependencies.unwinding] version = "0.2.3" default-features = false features = ["unwinder", "fde-custom", "hide-trace", "personality"] -optional = true diff --git a/crates/sel4-panicking/src/strategy/mod.rs b/crates/sel4-panicking/src/strategy/mod.rs index 1809a1627..2cff8d596 100644 --- a/crates/sel4-panicking/src/strategy/mod.rs +++ b/crates/sel4-panicking/src/strategy/mod.rs @@ -5,7 +5,7 @@ // cfg_if::cfg_if! { - if #[cfg(all(feature = "unwinding", panic = "unwind"))] { + if #[cfg(panic = "unwind")] { mod unwind; use unwind as imp; } else { diff --git a/crates/sel4-root-task/Cargo.nix b/crates/sel4-root-task/Cargo.nix index 057b1fa2d..c450211de 100644 --- a/crates/sel4-root-task/Cargo.nix +++ b/crates/sel4-root-task/Cargo.nix @@ -23,13 +23,8 @@ mk { }; features = { full = [ - "unwinding" "alloc" ]; - unwinding = [ - "sel4-panicking/unwinding" - "sel4-runtime-common/unwinding" - ]; alloc = [ "sel4-panicking/alloc" ]; diff --git a/crates/sel4-root-task/Cargo.toml b/crates/sel4-root-task/Cargo.toml index 3303c4bb7..18597331c 100644 --- a/crates/sel4-root-task/Cargo.toml +++ b/crates/sel4-root-task/Cargo.toml @@ -18,9 +18,8 @@ license = "BSD-2-Clause" [features] alloc = ["sel4-panicking/alloc"] -full = ["unwinding", "alloc"] +full = ["alloc"] single-threaded = ["sel4/single-threaded"] -unwinding = ["sel4-panicking/unwinding", "sel4-runtime-common/unwinding"] [dependencies] sel4 = { path = "../sel4" } diff --git a/crates/sel4-root-task/src/entry.rs b/crates/sel4-root-task/src/entry.rs index 3076b66a5..b7d35f330 100644 --- a/crates/sel4-root-task/src/entry.rs +++ b/crates/sel4-root-task/src/entry.rs @@ -26,7 +26,7 @@ unsafe extern "C" fn sel4_runtime_rust_entry(bootinfo: *const sel4::BootInfo) -> #[allow(unreachable_code)] fn inner_entry(bootinfo: *const sel4::BootInfo) -> ! { - #[cfg(all(feature = "unwinding", panic = "unwind"))] + #[cfg(panic = "unwind")] { sel4_runtime_common::set_eh_frame_finder().unwrap(); } diff --git a/crates/sel4-runtime-common/Cargo.nix b/crates/sel4-runtime-common/Cargo.nix index d24744d96..fef709a6e 100644 --- a/crates/sel4-runtime-common/Cargo.nix +++ b/crates/sel4-runtime-common/Cargo.nix @@ -14,8 +14,8 @@ mk { sel4 = localCrates.sel4 // { default-features = false; optional = true; }; sel4-initialize-tls = localCrates.sel4-initialize-tls // { features = [ "on-stack" ]; optional = true; }; }; - target."cfg(not(target_arch = \"arm\"))".dependencies = { - unwinding = unwindingWith [] // { optional = true; }; + target."cfg(all(panic = \"unwind\", not(target_arch = \"arm\")))".dependencies = { + unwinding = unwindingWith []; }; features = { tls = [ "dep:sel4-initialize-tls" "dep:sel4" ]; diff --git a/crates/sel4-runtime-common/Cargo.toml b/crates/sel4-runtime-common/Cargo.toml index 3c37a6cdd..bb372169e 100644 --- a/crates/sel4-runtime-common/Cargo.toml +++ b/crates/sel4-runtime-common/Cargo.toml @@ -28,8 +28,7 @@ sel4-initialize-tls = { path = "../sel4-initialize-tls", features = ["on-stack"] sel4-panicking-env = { path = "../sel4-panicking/env" } sel4-stack = { path = "../sel4-stack" } -[target."cfg(not(target_arch = \"arm\"))".dependencies.unwinding] +[target."cfg(all(panic = \"unwind\", not(target_arch = \"arm\")))".dependencies.unwinding] version = "0.2.3" default-features = false features = ["unwinder", "fde-custom", "hide-trace"] -optional = true diff --git a/crates/sel4-runtime-common/src/lib.rs b/crates/sel4-runtime-common/src/lib.rs index d198da33a..a05de6cf3 100644 --- a/crates/sel4-runtime-common/src/lib.rs +++ b/crates/sel4-runtime-common/src/lib.rs @@ -19,10 +19,10 @@ mod tls; #[cfg(all(feature = "tls", target_thread_local))] pub use tls::{initialize_tls_on_stack_and_continue, ContArg, ContFn}; -#[cfg(all(feature = "unwinding", panic = "unwind"))] +#[cfg(panic = "unwind")] mod unwinding; -#[cfg(all(feature = "unwinding", panic = "unwind"))] +#[cfg(panic = "unwind")] pub use self::unwinding::set_eh_frame_finder; #[allow(dead_code)]