From 9aaaf3d14234a4a92b5f8a981357de6081bc41e9 Mon Sep 17 00:00:00 2001 From: Nick Sieger Date: Mon, 14 Mar 2022 20:29:19 -0500 Subject: [PATCH 1/2] goreleaser: add -static to LDFLAGS for windows build --- .goreleaser.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 04f5049985..8f139e5409 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -64,6 +64,7 @@ builds: - amd64 env: - CGO_ENABLED=1 + - CGO_LDFLAGS=-static - CC=x86_64-w64-mingw32-gcc - CXX=x86_64-w64-mingw32-g++ archives: From bf5b236542699c3be0a00bdbd0b88d6bd397f198 Mon Sep 17 00:00:00 2001 From: Nick Sieger Date: Tue, 15 Mar 2022 09:27:28 -0500 Subject: [PATCH 2/2] ci: turning on cgo and -static for windows builds --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee80c930ef..8d4c4d943f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,7 +70,11 @@ jobs: - checkout - run: iex ./scripts/install-dc2.ps1 # Check to make sure Windows binaries compile - - run: go install -mod vendor ./cmd/tilt + - run: + command: go install -mod vendor ./cmd/tilt + environment: + CGO_ENABLED: '1' + CGO_LDFLAGS: -static - run: make shorttestsum - run: iex ./scripts/install.ps1 - store_test_results: