Cross compiling Go programs
Published in
1 min readOct 30, 2016
When I want to build an application on my macOS that will be deployed on Plan 9 I run:
% GOOS=plan9 GOARCH=amd64 go build
Go compiler toolchain originates from the pretty neat Plan 9 toolchain that includes Plan 9 assembler and C compilers. All possible combinations of GOOS and GOARCH can be found from the Go environment variables documentation.