guix_mirror_bot pushed a commit to branch go-team
in repository guix.
commit a672b2c4dce7c5b91a91d0230f7f9094c2407a40
Author: Roman Scherer <[email protected]>
AuthorDate: Sun Apr 19 15:06:33 2026 +0200
gnu: go-github-com-bytedance-sonic-loader: Skip build on non-x86-64.
internal/abi/abi.go references PtrSize and ReservedRegs, defined
only in amd64-specific files, so compilation of the root package
fails on non-x86-64. Still run the tests for the arch-neutral
internal/iasm/expr subpackage.
* gnu/packages/golang-xyz.scm (go-github-com-bytedance-sonic-loader)
[arguments]<#:skip-build?>: New argument.
<#:test-subdirs>: New argument.
<#:tests?>: Enable on non-cross builds.
Relates-to: guix/guix!8004
Change-Id: I1357c355637d456da841815b556bc184ee916c66
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/golang-xyz.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 536332a3ff..ba62f4da5b 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -4384,7 +4384,17 @@ using JIT and SIMD approaches.")
(arguments
(list
#:import-path "github.com/bytedance/sonic/loader"
- #:unpack-path "github.com/bytedance/sonic"))
+ #:unpack-path "github.com/bytedance/sonic"
+ ;; internal/abi/abi.go references PtrSize and ReservedRegs,
+ ;; which are defined only in amd64-specific files; compilation
+ ;; of the root package fails on non-x86-64.
+ #:skip-build? (not (target-x86-64?))
+ ;; On other architectures, restrict testing to the arch-neutral
+ ;; internal/iasm/expr subpackage.
+ #:test-subdirs (if (target-x86-64?)
+ #~(list "...")
+ #~(list "internal/iasm/expr"))
+ #:tests? (not (%current-target-system))))
(native-inputs
(list go-github-com-davecgh-go-spew
go-github-com-stretchr-testify))