diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-25 01:32:21 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-25 01:43:18 +0900 |
| commit | 20790af71ec9a69a462ecaaa7fc308e3b685383d (patch) | |
| tree | e7cfdd8fec51c5dc37db88ad887c07dee947b600 /internal/rosa/go.go | |
| parent | 43b8a40fc0e8d99bf29531d33f1f57d0c6e9df5e (diff) | |
internal/rosa: lazy initialise all artifacts
This improves performance, though not as drastically as lazy initialising llvm.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/go.go')
| -rw-r--r-- | internal/rosa/go.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/rosa/go.go b/internal/rosa/go.go index f9d5b9b2..fa5a4a49 100644 --- a/internal/rosa/go.go +++ b/internal/rosa/go.go @@ -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 } |
