Multi-arch builds with cgo deps? #5030
-
This one is tricky I think. I have a cgo project that depends on some libraries and builds fine on both amd64 and arm64. Sample yaml: builds:
- id: asdf
main: ./cmd/asdf/main.go
binary: asdf
env:
- CGO_ENABLED=1
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath #removes all file system paths from the compiled executable
goos:
- linux
goarch:
- amd64 If I add: goarch
- amd64
- arm64 It'll fail with this error:
If I replace How should I handle this with goreleaser? Just two separate files one for amd64 and one for arm64? |
Beta Was this translation helpful? Give feedback.
Answered by
caarlos0
Jul 29, 2024
Replies: 1 comment
-
there's docs about this: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
caarlos0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
there's docs about this: