cmd/mbf: use stage2 musl when possible

This avoids pulling in the stage3 toolchain when it is not requested.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-02-25 01:05:49 +09:00
parent b3749aaf0b
commit 2b93631f52

View File

@@ -270,10 +270,12 @@ func main() {
root = append(root, rosa.Std.Load(p))
}
musl, compilerRT, runtimes, clang := rosa.Std.NewLLVM()
root = append(root, musl)
if flagWithToolchain {
root = append(root, compilerRT, runtimes, clang)
musl, compilerRT, runtimes, clang := rosa.Std.NewLLVM()
root = append(root, musl, compilerRT, runtimes, clang)
} else {
musl, _, _, _ := (rosa.Std - 1).NewLLVM()
root = append(root, musl)
}
root = append(root,
rosa.Std.Load(rosa.Mksh),