From b31bd47f8c3354623fac86a63e10c4d391874416 Mon Sep 17 00:00:00 2001 From: pyrex41 Date: Sun, 27 Sep 2026 10:59:00 -0500 Subject: [PATCH] Fix Yggdrasil builder compile options for external modules --- crates/yggdrasil-build/src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/yggdrasil-build/src/main.rs b/crates/yggdrasil-build/src/main.rs index 0c9996e..756bd50 100644 --- a/crates/yggdrasil-build/src/main.rs +++ b/crates/yggdrasil-build/src/main.rs @@ -1,7 +1,7 @@ //! Yggdrasil stage-2 builder (Rust target). //! //! `yggdrasil-build ` reads a Yggdrasil shaken -//! directory (manifest v3: `yggdrasil.manifest.txt`, a shaken +//! directory (manifest v3 or v4: `yggdrasil.manifest.txt`, a shaken //! `kernel.kl`, user `.kl` files) and scaffolds a standalone Cargo //! project in ``: //! @@ -29,7 +29,7 @@ use std::process::ExitCode; use klcompile::{compile_kl, CompileOptions, SkipPolicy, KERNEL_SLOW_DEFUNS}; -/// Parsed Yggdrasil manifest v3 (`key=value` lines; unknown keys ignored). +/// Parsed Yggdrasil manifest v3/v4 (`key=value` lines; unknown keys ignored). #[derive(Debug, Default)] struct Manifest { kernel: String, @@ -60,9 +60,9 @@ fn parse_manifest(path: &Path) -> Result { )); }; match key { - "manifest-version" if value != "3" => { + "manifest-version" if value != "3" && value != "4" => { return Err(format!( - "unsupported manifest-version {value:?} (expected 3)" + "unsupported manifest-version {value:?} (expected 3 or 4)" )); } "kernel" => m.kernel = value.to_string(), @@ -105,6 +105,7 @@ fn compile_options(label: &str) -> CompileOptions { force_skip: KERNEL_SLOW_DEFUNS.iter().map(|s| s.to_string()).collect(), }, emit_manifest: None, + seal_same_module: false, } }