From aa3efbc824ead68af59bc21faa8e626428838aba Mon Sep 17 00:00:00 2001 From: Nick Sieger Date: Tue, 15 Mar 2022 10:14:33 -0500 Subject: [PATCH] goreleaser: add -static to LDFLAGS for windows build (#5594) * goreleaser: add -static to LDFLAGS for windows build * ci: turning on cgo and -static for windows builds --- .circleci/config.yml | 6 +++++- .goreleaser.yml | 1 + 2 files changed, 6 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: 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: