internal/rosa: lazy initialise all artifacts
All checks were successful
Test / Create distribution (push) Successful in 48s
Test / Sandbox (push) Successful in 2m37s
Test / Hakurei (push) Successful in 4m5s
Test / ShareFS (push) Successful in 4m2s
Test / Hpkg (push) Successful in 4m33s
Test / Sandbox (race detector) (push) Successful in 4m59s
Test / Hakurei (race detector) (push) Successful in 5m57s
Test / Flake checks (push) Successful in 1m44s

This improves performance, though not as drastically as lazy initialising llvm.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-25 01:32:21 +09:00
parent 43b8a40fc0
commit 20790af71e
17 changed files with 174 additions and 94 deletions

View File

@@ -100,9 +100,7 @@ func newBusyboxBin() pkg.Artifact {
)
}
// NewBusybox returns a [pkg.Artifact] containing a dynamically linked busybox
// installation usable within the [Toolchain] it is compiled against.
func (t Toolchain) NewBusybox() pkg.Artifact {
func (t Toolchain) newBusybox() pkg.Artifact {
const (
version = "1.37.0"
checksum = "Ial94Tnt7esJ_YEeb0AxunVL6MGYFyOw7Rtu2o87CXCi1TLrc6rlznVsN1rZk7it"
@@ -114,8 +112,8 @@ func (t Toolchain) NewBusybox() pkg.Artifact {
}
return t.New("busybox-"+version, stage3Concat(t, []pkg.Artifact{},
t.NewMake(),
t.NewKernelHeaders(),
t.Load(Make),
t.Load(KernelHeaders),
), nil, slices.Concat([]string{
"ROSA_BUSYBOX_ENABLE=" + strings.Join([]string{
"STATIC",
@@ -354,3 +352,4 @@ index 64e752f4b..40f5ba7f7 100644
}`)),
))
}
func init() { artifactsF[Busybox] = Toolchain.newBusybox }