Skip to content

bdwyertech/dkr-go-crosscompile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CGO Cross Compilation on Alpine Linux

This is an image intended for Go cross-compilation, primarily for Mac & Windows. This was created out of a need to build a system tray application for both platforms.

Usage

# Mac
export CGO_ENABLED=1
export CC=o64-clang
export CXX=o64-clang  

# Windows
export CGO_ENABLED=1
export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g  

# Linux - ARM64
export CGO_ENABLED=1
export CC=aarch64-linux-musl-gcc
export CXX=aarch64-linux-musl-g