Skip to content

Instantly share code, notes, and snippets.

@deankarn
Last active August 29, 2015 14:15
Show Gist options
  • Save deankarn/6c638781bc3c022b2305 to your computer and use it in GitHub Desktop.
Save deankarn/6c638781bc3c022b2305 to your computer and use it in GitHub Desktop.
Go Cross compile setup + build
Step #1 setup cross compiler(s) you want/need to use
cd $(go env GOROOT)/src
GOOS=linux GOARCH=amd64 ./make.bash <- GOOS=operating system - linux, darwin, windows etc... GOARCH=architechture - amd64, x86_64 386...
Step #2 navigate to go project
cd /path/of/go/project
env GOOS=linux GOARCH=amd64 go build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment