diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-11-23 18:12:57 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-11-23 18:12:57 +0900 |
| commit | 33f43117c6e6b53efa9226c276f416348fc2d63b (patch) | |
| tree | 03e7c8bcbdfb4185ddd23d6df44a9cc7cd2c0850 /internal | |
| parent | 4d31e3fc36bb6fad04b121ff59f31ad9ea7bd418 (diff) | |
internal/rosa: fix cross-compile target check
This rejects a non-cross state attempting to cross compile the native
target architecture.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/rosa/state.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go index d6b2e65a..5b6c84cc 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -236,7 +236,7 @@ var ErrInvalidCross = errors.New("invalid cross-compilation state") // NewCross returns a copy of s for cross-compilation. func (s *S) NewCross(arch string) *S { - if s.native != nil && arch == s.native.Arch() { + if (s.native != nil && arch == s.native.Arch()) || arch == runtime.GOARCH { panic(ErrInvalidCross) } |
