aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/busybox.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-25 01:32:21 +0900
committerOphestra <cat@gensokyo.uk>2026-01-25 01:43:18 +0900
commit20790af71ec9a69a462ecaaa7fc308e3b685383d (patch)
treee7cfdd8fec51c5dc37db88ad887c07dee947b600 /internal/rosa/busybox.go
parent43b8a40fc0e8d99bf29531d33f1f57d0c6e9df5e (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/busybox.go')
-rw-r--r--internal/rosa/busybox.go9
1 files changed, 4 insertions, 5 deletions
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 }