kata-os-common: make CAmkES-specific support controlled by a feature

The slot allocator has CAmkES-specific support that will not build for
a non-CAmkES target. Add a "camkes_support" feature flag that controls
whether the slot allocator is included. This is enabled by default but
allows users like kata-os-rootserver to workaround the problem.

Change-Id: I2decb9fc794c215455e223d17c24c6a19cc52d56
GitOrigin-RevId: d7a3811b4a9a000b0f34fbc2abdfc628250f64d4
This commit is contained in:
Sam Leffler
2022-05-06 19:34:02 +00:00
parent 6eb1d0537f
commit f06f3a51e6
2 changed files with 5 additions and 0 deletions

View File

@@ -5,6 +5,10 @@ name = "kata-os-common"
version = "0.1.0"
edition = "2021"
[features]
default = ["camkes_support"]
camkes_support = []
[dependencies]
capdl = { path = "src/capdl" }
model = { path = "src/model" }

View File

@@ -5,5 +5,6 @@ pub extern crate model;
pub extern crate allocator;
pub extern crate logger;
pub extern crate panic;
#[cfg(feature = "camkes_support")]
pub extern crate slot_allocator;
pub extern crate sel4_sys;