aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/state.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-11-27 13:49:03 +0900
committerOphestra <cat@gensokyo.uk>2026-11-27 13:49:03 +0900
commit3a27514df88075d2f7c3b39fca02f9cd89e5e0d5 (patch)
tree667f12ebf775f7959c9d9e5cb300c87007fec055 /internal/rosa/state.go
parent1b108e0224e34f0d7af989d83f3ae3895e542a65 (diff)
internal/rosa: optionally reject cross-compilation
This provides a generic way for any package to reject cross-compilation without going through its helper. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/state.go')
-rw-r--r--internal/rosa/state.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go
index 5b8df48d..7b755cd2 100644
--- a/internal/rosa/state.go
+++ b/internal/rosa/state.go
@@ -1140,10 +1140,10 @@ func (ctx *evalContext) pf(
overlay string
join bool
- tools, native, inputs, extra azalea.Array
+ tools, inputs, extra azalea.Array
- cross, runtimes = azalea.Array{}, azalea.Array{}
- bootstrap, libc = true, true
+ cross, native, runtimes = azalea.Array{}, azalea.Array{}, azalea.Array{}
+ bootstrap, libc = true, true
)
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("description"): &meta.Description,
@@ -1188,6 +1188,7 @@ func (ctx *evalContext) pf(
}
attr.Std, attr.NoLibc = !bootstrap, !libc
attr.NoArch = cross == nil
+ attr.RejectCross = native == nil
var inputsH, extraH P
if inputsH, err = toHandles(inputs); err != nil {
return