From aaeefb7be7a6b59810be514d6c40159f40761f0d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 1 Nov 2026 00:28:47 +0900 Subject: internal/rosa: enable checks for cross-compilation This uses QEMU to run checks when supported. 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 aa03b8ba..dc1b3109 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -226,15 +226,13 @@ type S struct { // crosscompiling state for the native architecture. var ErrInvalidCross = errors.New("invalid cross-compilation state") -// NewCross returns a copy of s for cross-compilation. Testing is disabled in -// the copy. +// NewCross returns a copy of s for cross-compilation. func (s *S) NewCross(arch string) *S { if s.native != nil && arch == s.native.Arch() { panic(ErrInvalidCross) } p := s.Clone() - p.opts |= OptSkipCheck p.native, p.arch = s, arch return p } @@ -928,8 +926,10 @@ func (s *S) getFrame() azalea.Frame { ) (v any, set bool, err error) { var attr CMakeHelper var test azalea.AString + qemu := true if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ k("early"): &attr.Early, + k("qemu"): &qemu, k("append"): &attr.Append, k("buildType"): &attr.BuildType, k("cache"): &attr.Cache, @@ -939,6 +939,7 @@ func (s *S) getFrame() azalea.Frame { }); err != nil { return } + attr.SkipEmulator = !qemu attr.Test = test.V attr.SkipTest = test.Nil -- cgit v1.3.1