diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2021-04-26 21:13:06 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2021-09-13 15:33:30 +0300 |
| commit | de4f5df95db6c2e7071bf5e44c0d7ae928da1025 (patch) | |
| tree | b760d81f90354814819a41c11684d8084e322b95 /doc | |
| parent | 43f9757f809d0fb3cd7c3e8b24bfb927179055e8 (diff) | |
build/go: Support cross compiling.
* guix/build-system/go.scm (go-target): New procedure.
(go-build): Add goarch, goos keywords. Adjust bag depending if doing a
native or cross compile.
(go-cross-build): New procedure.
* guix/build/go-build-system.scm (setup-go-environment): Accept goarch,
goos keywords. Set go environment variables based on target architecture.
* doc/guix.texi (Build Systems): Mention new go-build-system keywords.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 220499503d6..2fc96879106 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -7759,6 +7759,13 @@ Packages that provide Go libraries should install their source code into | |||
| 7759 | the built output. The key @code{#:install-source?}, which defaults to | 7759 | the built output. The key @code{#:install-source?}, which defaults to |
| 7760 | @code{#t}, controls whether or not the source code is installed. It can | 7760 | @code{#t}, controls whether or not the source code is installed. It can |
| 7761 | be set to @code{#f} for packages that only provide executable files. | 7761 | be set to @code{#f} for packages that only provide executable files. |
| 7762 | |||
| 7763 | Packages can be cross-built, and if a specific architecture or operating | ||
| 7764 | system is desired then the keywords @code{#:goarch} and @code{#:goos} | ||
| 7765 | can be used to force the package to be built for that architecture and | ||
| 7766 | operating system. The combinations known to Go can be found | ||
| 7767 | @url{"https://golang.org/doc/install/source#environment", in their | ||
| 7768 | documentation}. | ||
| 7762 | @end defvr | 7769 | @end defvr |
| 7763 | 7770 | ||
| 7764 | @defvr {Scheme Variable} glib-or-gtk-build-system | 7771 | @defvr {Scheme Variable} glib-or-gtk-build-system |
