From 3a27514df88075d2f7c3b39fca02f9cd89e5e0d5 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 27 Nov 2026 13:49:03 +0900 Subject: 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 --- internal/rosa/state.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/rosa/state.go') 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 -- cgit v1.3.1