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
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:
@@ -2,14 +2,13 @@ package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
// NewZlib returns a new [pkg.Artifact] containing an installation of zlib.
|
||||
func (t Toolchain) NewZlib() pkg.Artifact {
|
||||
func (t Toolchain) newZlib() pkg.Artifact {
|
||||
const (
|
||||
version = "1.3.1"
|
||||
checksum = "E-eIpNzE8oJ5DsqH4UuA_0GDKuQF5csqI8ooDx2w7Vx-woJ2mb-YtSbEyIMN44mH"
|
||||
)
|
||||
return t.New("zlib-"+version, []pkg.Artifact{
|
||||
t.NewMake(),
|
||||
t.Load(Make),
|
||||
}, nil, nil, `
|
||||
cd "$(mktemp -d)"
|
||||
CC="clang -fPIC" /usr/src/zlib/configure \
|
||||
@@ -23,3 +22,4 @@ make DESTDIR=/work install
|
||||
pkg.TarGzip,
|
||||
)))
|
||||
}
|
||||
func init() { artifactsF[Zlib] = Toolchain.newZlib }
|
||||
|
||||
Reference in New Issue
Block a user