From dc050d57224171065461c28b8d8a0e6a7656c094 Mon Sep 17 00:00:00 2001 From: Nick Spinale Date: Mon, 7 Oct 2024 01:01:18 -0700 Subject: [PATCH] crates/private/meta: Fix cross-platform build Signed-off-by: Nick Spinale --- crates/private/meta/Cargo.nix | 6 +++++- crates/private/meta/Cargo.toml | 4 +++- crates/private/meta/src/lib.rs | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/crates/private/meta/Cargo.nix b/crates/private/meta/Cargo.nix index eb2246639..e8e11e4c4 100644 --- a/crates/private/meta/Cargo.nix +++ b/crates/private/meta/Cargo.nix @@ -36,7 +36,6 @@ mk { sel4-one-ref-cell sel4-panicking sel4-panicking-env - sel4-reset sel4-shared-ring-buffer sel4-shared-ring-buffer-block-io sel4-shared-ring-buffer-block-io-types @@ -64,6 +63,11 @@ mk { target."cfg(not(target_thread_local))".dependencies = { sel4 = localCrates.sel4 // { features = [ "single-threaded" ]; }; }; + target."cfg(target_arch = \"aarch64\")".dependencies = { + inherit (localCrates) + sel4-reset + ; + }; target."cfg(not(target_arch = \"x86_64\"))".dependencies = { sel4-platform-info = localCrates.sel4-platform-info // { optional = true; }; }; diff --git a/crates/private/meta/Cargo.toml b/crates/private/meta/Cargo.toml index 6079d86bf..40c8ddb4a 100644 --- a/crates/private/meta/Cargo.toml +++ b/crates/private/meta/Cargo.toml @@ -52,7 +52,6 @@ sel4-panicking = { path = "../../sel4-panicking" } sel4-panicking-env = { path = "../../sel4-panicking/env" } sel4-pl011-driver = { path = "../../drivers/pl011" } sel4-pl031-driver = { path = "../../drivers/pl031" } -sel4-reset = { path = "../../sel4-reset" } sel4-root-task = { path = "../../sel4-root-task", features = ["full"], optional = true } sel4-shared-ring-buffer = { path = "../../sel4-shared-ring-buffer" } sel4-shared-ring-buffer-block-io = { path = "../../sel4-shared-ring-buffer/block-io" } @@ -73,3 +72,6 @@ sel4-platform-info = { path = "../../sel4-platform-info", optional = true } [target."cfg(not(target_thread_local))".dependencies] sel4 = { path = "../../sel4", features = ["single-threaded"] } + +[target."cfg(target_arch = \"aarch64\")".dependencies] +sel4-reset = { path = "../../sel4-reset" } diff --git a/crates/private/meta/src/lib.rs b/crates/private/meta/src/lib.rs index ac35b0ec7..75b5d5665 100644 --- a/crates/private/meta/src/lib.rs +++ b/crates/private/meta/src/lib.rs @@ -106,7 +106,14 @@ definitely! { sel4_one_ref_cell sel4_panicking sel4_panicking_env +} + +maybe! { + #[cfg(target_arch = "aarch64")] sel4_reset +} + +definitely! { sel4_shared_ring_buffer sel4_shared_ring_buffer_block_io sel4_shared_ring_buffer_block_io_types