Skip to content

Comment on Go 1.5 Release Notesparent

Comments

In go 1.4, you need to build the go tools for a given target beforehand. In go 1.5, you'll only have to set some environment variables before you call go build, that's it, but unfortunately this doesn't include cgo:

    env GOOS=linux GOARCH=arm GOARM=7 go build hello.go
This link is a good summary of the situation now and in future:

http://dave.cheney.net/2015/03/03/cross-compilation-just-got...

This one talks about cgo:

https://medium.com/@rakyll/go-1-5-cross-compilation-488092ba...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.