internal/rosa: key metadata by string

For upcoming azalea integration. The API is quite ugly right now to ease migration.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-17 13:07:12 +09:00
parent c2ff9c9fa5
commit 30eb0d6a61
95 changed files with 1514 additions and 1567 deletions

View File

@@ -2,12 +2,12 @@ package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newTamaGo() (pkg.Artifact, string) {
func (t Toolchain) newTamaGo(s *S) (pkg.Artifact, string) {
const (
version = "1.26.3"
checksum = "-nH3MjAzDDLTeJ2hRKYJcJwo5-Ikci4zOHfB8j1vKn7zrF9TS6zYaoLi8qohGwAE"
)
return t.New("tamago-go"+version, 0, t.AppendPresets(nil,
return s.New(t, "tamago-go"+version, 0, s.AppendPresets(t, nil,
Bash,
Go,
), nil, []string{
@@ -21,8 +21,8 @@ cd /work/system/tamago/src
chmod -R +w ..
sed -i \
's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \
cmd/link/internal/`+arch+`/obj.go
's,/lib/ld-musl-`+s.linuxArch()+`.so.1,/system/bin/linker,' \
cmd/link/internal/`+s.arch+`/obj.go
sed -i \
's/cpu.X86.HasAVX512VBMI/& \&\& cpu.X86.HasPOPCNT/' \
internal/runtime/gc/scan/scan_amd64.go
@@ -40,7 +40,7 @@ rm \
))), version
}
func init() {
artifactsM[TamaGo] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newTamaGo,
Name: "tamago",
@@ -48,5 +48,5 @@ func init() {
Website: "https://github.com/usbarmory/tamago-go",
ID: 388872,
}
})
}