Go Cross-Compilation Mac to Linux

From NovaOrdis Knowledge Base
Revision as of 02:23, 9 December 2023 by Ovidiu (talk | contribs) (Created page with "=Internal= =Overview= Set <code>GOOS</code> and <code>GOARCH</code> environment variables to appropriate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

Set GOOS and GOARCH environment variables to appropriate values, during the build.

To build on Mac for Linux:

export GOOS=linux
export GOARCH=amd64