Closed davidrenne closed 2 years ago
Yes it should compile on M1 - the darwin code is not platform specific.
When cross-compiling as you illustrate you will need CGO_ENABLED=1
yea @andydotxyz I dont use CGO_ENABLED on the mac build, but it still compiles fine without errors. Why is that? I barely read the docs on this library as I was using existing code and found this fork because it worked on ubuntu/linux whereas the old fork does not. Nice that you guys compile for M1 too, but why do I have to enable CGO on M1 when on the normal one that uses the same system tray package code, I just build like this GOOS=darwin GOARCH=amd64 go build -a -ldflags
CGO_ENABLED for M1 did compile fine though, now I have to find a friend with an AppleSilicon chip to test it someday.
CGO is enabled by default when not cross compiling.
@Jacalz thanks for the info
GOOS=darwin GOARCH=arm64 go build -a -tags netgo -ldflags
And I get this stack trace when building:
It'd be nice if I have the same tray as amd64 on OSX. How can this be implemented for arm?