github.com/goreleaser/goreleaser@v1.25.1/www/docs/cookbooks/cgo-and-crosscompiling.md (about) 1 # Cross-compiling Go with CGO 2 3 The best option to cross-compile Go project with CGO dependencies would be in 4 using Docker image. 5 [This project](https://github.com/goreleaser/goreleaser-cross) provides the 6 [Docker images](https://hub.docker.com/repository/docker/goreleaser/goreleaser-cross) 7 with a bunch of ready-to-use cross-compilers as well as how-to make a `sysroot`. 8 All that wrapped into [this example](https://github.com/goreleaser/goreleaser-cross-example) 9 10 If you have [GoReleaser Pro](/pro), you can also use the split and merge feature 11 to build for each platform natively and merge the builds later. 12 Check [this article][1] for an example, and the [documentation here][2]. 13 14 [1]: https://carlosbecker.com/posts/goreleaser-split-merge/ 15 [2]: /customization/partial