diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-20 05:57:13 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-20 05:57:26 +0900 |
| commit | 656059278d96c86987c261ae842592617ee17962 (patch) | |
| tree | 469c3e195589e7f4005477bfe391707472ef4c29 /internal/rosa/state.go | |
| parent | 1a9974ffdc63e9deb24e4c83f4b4ce566311360f (diff) | |
internal/rosa/package: migrate remaining trivial packages
The rest are migrated individually.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/state.go')
| -rw-r--r-- | internal/rosa/state.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go index a6149d46..5d3421f2 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -189,6 +189,8 @@ type S struct { // Target architecture. arch string + // For matching arch-specific values. + identArch unique.Handle[azalea.Ident] // For initialising arch. archOnce sync.Once @@ -227,6 +229,7 @@ func (s *S) wantsArch() { s.archOnce.Do(func() { if s.arch == "" { s.arch = runtime.GOARCH + s.identArch = unique.Make(azalea.Ident(s.arch)) } }) } @@ -245,6 +248,7 @@ func (s *S) DropCaches(targetArch string, flags int) { } s.arch = targetArch + s.identArch = unique.Make(azalea.Ident(s.arch)) s.opts = flags for i := range s.c { s.c[i].Clear() @@ -422,10 +426,7 @@ func (s *S) getFrame() azalea.Frame { return unique.Make(azalea.Ident(name)) } - var ( - identDefault = k("default") - identArch = k(s.arch) - ) + var identDefault = k("default") enumCompress := map[unique.Handle[azalea.Ident]]any{ k("uncompressed"): uint32(pkg.TarUncompressed), @@ -434,6 +435,7 @@ func (s *S) getFrame() azalea.Frame { } s.frame.Val = map[unique.Handle[azalea.Ident]]any{ + k("triple"): s.triple(), k("linuxArch"): s.linuxArch(), k("earlyLDFLAGS"): s.earlyLDFLAGS(false), @@ -625,7 +627,7 @@ func (s *S) getFrame() azalea.Frame { fallback = arg.V continue - case identArch: + case s.identArch: return arg.V, true, nil } } |
