From 20790af71ec9a69a462ecaaa7fc308e3b685383d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 25 Jan 2026 01:32:21 +0900 Subject: internal/rosa: lazy initialise all artifacts This improves performance, though not as drastically as lazy initialising llvm. Signed-off-by: Ophestra --- internal/rosa/busybox.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'internal/rosa/busybox.go') diff --git a/internal/rosa/busybox.go b/internal/rosa/busybox.go index b4fb2d3f..5a1fa924 100644 --- a/internal/rosa/busybox.go +++ b/internal/rosa/busybox.go @@ -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 } -- cgit v1.3.1