cmd/mbf: use stage2 musl when possible
All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (push) Successful in 2m35s
Test / Hakurei (push) Successful in 3m54s
Test / ShareFS (push) Successful in 4m4s
Test / Hpkg (push) Successful in 4m34s
Test / Sandbox (race detector) (push) Successful in 5m4s
Test / Hakurei (race detector) (push) Successful in 5m58s
Test / Flake checks (push) Successful in 1m44s

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)) root = append(root, rosa.Std.Load(p))
} }
musl, compilerRT, runtimes, clang := rosa.Std.NewLLVM()
root = append(root, musl)
if flagWithToolchain { 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, root = append(root,
rosa.Std.Load(rosa.Mksh), rosa.Std.Load(rosa.Mksh),