mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-21 21:07:19 +02:00
docs: clarify cgo
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
a1305d3912
commit
eedf9578a6
www/docs
@ -1,5 +1,15 @@
|
|||||||
# Cross-compiling Go with CGO
|
# Cross-compiling Go with CGO
|
||||||
|
|
||||||
Best option to cross-compile Go project with CGO dependencies would be in using Docker image.
|
The best option to cross-compile Go project with CGO dependencies would be in
|
||||||
[This project](https://github.com/goreleaser/goreleaser-cross) provides the docker [images](https://hub.docker.com/repository/docker/goreleaser/goreleaser-cross) with bunch of ready to use cross-compilers as well as how-to make sysroot.
|
using Docker image.
|
||||||
All that wrapped into [example](https://github.com/goreleaser/goreleaser-cross-example)
|
[This project](https://github.com/goreleaser/goreleaser-cross) provides the
|
||||||
|
[Docker images](https://hub.docker.com/repository/docker/goreleaser/goreleaser-cross)
|
||||||
|
with a bunch of ready-to-use cross-compilers as well as how-to make a `sysroot`.
|
||||||
|
All that wrapped into [this example](https://github.com/goreleaser/goreleaser-cross-example)
|
||||||
|
|
||||||
|
If you have [GoReleaser Pro](/pro), you can also use the split and merge feature
|
||||||
|
to build for each platform natively and merge the builds later.
|
||||||
|
Check [this article][1] for an example, and the [documentation here][2].
|
||||||
|
|
||||||
|
[1]: https://carlosbecker.com/posts/goreleaser-split-merge/
|
||||||
|
[2]: /customization/partial
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# CGO
|
# CGO
|
||||||
|
|
||||||
If you need to cross-compile with CGO enabled, our Docker image is not
|
Compiling with CGO is a bit trickier.
|
||||||
supported, and your configuration will not look that "clean", unfortunately.
|
It won't work "out of the box" with or without GoReleaser: you have to set more
|
||||||
|
things up.
|
||||||
|
|
||||||
You can check [this cookbook](/cookbooks/cgo-and-crosscompiling/) for an
|
[This cookbook](/cookbooks/cgo-and-crosscompiling/) contains more information.
|
||||||
example.
|
|
||||||
|
|
||||||
You can also see the discussion about CGO in
|
Tools like `xgo` are not natively supported, and we make no promises about
|
||||||
[this issue](https://github.com/goreleaser/goreleaser/issues/708).
|
whether or how well they work withing GoReleaser or not.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user