aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/state.go')
-rw-r--r--internal/rosa/state.go12
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
}
}