Skip to content

Support custom environment at the OSArch level #138

@IainSteers

Description

@IainSteers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions