How to set buildmode only for architectures that support it? #5680
-
Hi, Noble people! When I set
(https://pkg.go.dev/cmd/go#hdr-Build_modes) I got:
That's because not all arches support it: golang/go#64875 Is there a way to override build mode to default for I guess I can list all of the os X arch combinations that do not support the buildmode, but is there a better way?
Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Found this example: |
Beta Was this translation helpful? Give feedback.
-
Hey! I believe you'll have to create one build with the targets that support it, and another build with the targets that don't. As long as you're not filtering anything by id later (i.e. setting Note that you'll need to add an ID to both builds, e.g.: builds:
- id: pie
buildmode: pie
targets: [ ... ]
- id: nopie
targets: [ ... ] Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hey!
I believe you'll have to create one build with the targets that support it, and another build with the targets that don't.
As long as you're not filtering anything by id later (i.e. setting
ids:
), it should all work fine.Note that you'll need to add an ID to both builds, e.g.:
Hope this helps!