|
|
|
|
|
by 4ad
4998 days ago
|
|
Since the Go1 release, Go is not a moving target anymore. Stable releases are rare and there are binary packages available if you are so inclined. Go compilers, being derived from Plan 9, are always cross compiling. To cross compile you just set and export GOARCH and GOOS to your target, for example: GOOS=windows GOARCH=386 CGO_ENABLED=0 go build foo.bar/baz
Would build foo.bar/baz for 32 bit Windows from any system that has Go and ran make.bash --no-clean with those variables set. More interesting is building for ARM: GOOS=linux GOARCH=arm CGO_ENABLED=0 go build foo.bar/baz
|
|