We have a couple of cross-platform CGo projects that require custom CC and CXX specified per os-arch combination.
This is problematic because distgo currently only supports environment specification at the build level. Currently we're working around this by using multiple dist-plugin files and passing them to godel directly with the --config flag.
This isn't great because then the manifest and metadata files in the dist aren't entirely accurate, and it's hacky in CI.
As a solution, I'm envisaging something like:
build:
environment:
CGO_ENABLED: "1"
main-pkg: ./main
os-archs:
- os: darwin
arch: amd64
environment:
CC: /path/to/macos-cc
CXX: /path/to/macos-cxx
- os: windows
arch: amd64
environment:
CC: /path/to/win64-cc
CXX: /path/to/win64-cxx
We have a couple of cross-platform CGo projects that require custom
CCandCXXspecified per os-arch combination.This is problematic because distgo currently only supports environment specification at the build level. Currently we're working around this by using multiple dist-plugin files and passing them to godel directly with the
--configflag.This isn't great because then the manifest and metadata files in the dist aren't entirely accurate, and it's hacky in CI.
As a solution, I'm envisaging something like: