Add sel4-config build helper for syncing crates to an seL4 kernel build.

sel4-config is a build helper for keeping a crate's features in sync
with an seL4 kernel. sel4_config::get_sel4_features parses a gen_config.h
artifact from an seL4 build and returns the intersection of the feature
set with the features listed in the caller's Cargo.toml.

Change sel4-sys to use sel4-config to collect features (instead of
depending only on features from Cargo.toml). sel4-sys finds the directory
with kernel artifacts using an SEL4_OUT_DIR environment variable. If
that's not set it falls back to ${ROOTDIR}/out/kata/kernel.

Change workspace crates to use resolver="2" to deal with cargo's
mishandling of dependent features (target build of serde polluted by
std build-dep indirect through cargo_toml).

While here make sel4-sys fall back to ${ROOTDIR}/kata/kernel when SEL4_DIR
is not set in the environment.

Change-Id: I47cf2eab4aa8cd2e502f741738f587c222e94716
GitOrigin-RevId: b661f0b78c0bfe70861965a420d25add8a128cb7
This commit is contained in:
Sam Leffler
2021-12-12 00:54:42 +00:00
parent 164a27b601
commit 9d2f298efa
11 changed files with 135 additions and 75 deletions

View File

@@ -9,6 +9,7 @@ members = [
"kata-uart-client",
"zmodem",
]
resolver = "2"
[profile.dev]
opt-level = 0