Created
September 5, 2014 09:01
-
-
Save oozzal/053b6ad9c0c8ea24ff6d to your computer and use it in GitHub Desktop.
Cross Compiling Go Scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install go | |
go get github.com/laher/goxc | |
# build cross-compilers | |
goxc -t | |
# create a project in $GO_PATH/src/<project-dir> | |
# inside project-dir | |
# build binaries for different platforms | |
goxc | |
# or for a specific platform (intel-based linux in this case) | |
GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -o test.linux test.go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment