internal/rosa: make toolchain optional
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m34s
Test / Hakurei (push) Successful in 3m55s
Test / ShareFS (push) Successful in 4m0s
Test / Hpkg (push) Successful in 4m27s
Test / Sandbox (race detector) (push) Successful in 4m58s
Test / Hakurei (race detector) (push) Successful in 6m9s
Test / Flake checks (push) Successful in 1m35s

The final Rosa OS image does not need the toolchain.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-02-23 18:07:38 +09:00
parent ae8c365c0f
commit a5fea4686e

View File

@@ -225,6 +225,8 @@ const (
TExclusive = 1 << iota TExclusive = 1 << iota
// TEarly hints for an early variant of [Toybox] to be used when available. // TEarly hints for an early variant of [Toybox] to be used when available.
TEarly TEarly
// TNoToolchain excludes the LLVM toolchain.
TNoToolchain
) )
var ( var (
@@ -309,15 +311,18 @@ mkdir -vp /work/system/bin
if flag&TEarly != 0 { if flag&TEarly != 0 {
toybox = toyboxEarly toybox = toyboxEarly
} }
support = slices.Concat(extra, []pkg.Artifact{ std := []pkg.Artifact{cureEtc{newIANAEtc()}, musl}
cureEtc{newIANAEtc()}, toolchain := []pkg.Artifact{compilerRT, runtimes, clang}
musl, utils := []pkg.Artifact{
compilerRT,
runtimes,
clang,
boot.Load(Mksh), boot.Load(Mksh),
boot.Load(toybox), boot.Load(toybox),
}) }
if flag&TNoToolchain != 0 {
toolchain = nil
}
support = slices.Concat(extra, std, toolchain, utils)
env = fixupEnviron(env, []string{ env = fixupEnviron(env, []string{
EnvTriplet + "=" + triplet(), EnvTriplet + "=" + triplet(),
lcMessages, lcMessages,