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

@@ -10,7 +10,7 @@ import (
func (t Toolchain) newGoBootstrap() pkg.Artifact {
const checksum = "8o9JL_ToiQKadCTb04nvBDkp8O1xiWOolAxVEqaTGodieNe4lOFEjlOxN3bwwe23"
return t.New("go1.4-bootstrap", []pkg.Artifact{
t.NewBash(),
t.Load(Bash),
}, nil, []string{
"CGO_ENABLED=0",
}, `
@@ -65,8 +65,7 @@ sh make.bash
)))
}
// NewGo returns a [pkg.Artifact] containing the Go toolchain.
func (t Toolchain) NewGo() pkg.Artifact {
func (t Toolchain) newGoLatest() pkg.Artifact {
go119 := t.newGo(
"1.19",
"9_e0aFHsIkVxWVGsp9T2RvvjOc3p4n9o9S8tkNe9Cvgzk_zI2FhRQB7ioQkeAAro",
@@ -90,3 +89,4 @@ func (t Toolchain) NewGo() pkg.Artifact {
)
return go125
}
func init() { artifactsF[Go] = Toolchain.newGoLatest }