forked from security/hakurei
internal/rosa: lazy initialise all artifacts
This improves performance, though not as drastically as lazy initialising llvm. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user