summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDamien Claisse <d.claisse@criteo.com>2021-02-25 12:27:27 +0100
committerDamien Claisse <d.claisse@criteo.com>2021-02-25 12:52:03 +0100
commit69fd66299fe558d4367e21d5d842f5ea5c9b2814 (patch)
tree0a6b5eab445c84ecdae6dbde0b5230c280368f6b
parent3c6f5dafdc58099800b6b8705c2d12f6d964de0b (diff)
goreleaser: improve portability
- Use tags=netgo to ensure net package won't use cgo - Rebuild stdlib (go build -a) to really disable cgo as it was tried in https://github.com/osrg/gobgp/pull/2300 - Remove static ldflags as it would statically compile cgo
-rw-r--r--.goreleaser.yml10
1 files changed, 8 insertions, 2 deletions
diff --git a/.goreleaser.yml b/.goreleaser.yml
index 7f3b564e..90969ce2 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -9,7 +9,10 @@ builds:
- id: gobgp
main: ./cmd/gobgp/
binary: gobgp
- ldflags: -s -extldflags "-static"
+ flags:
+ - -a
+ - -tags=netgo
+ ldflags: -s
goos:
- linux
goarch:
@@ -21,7 +24,10 @@ builds:
- id: gobgpd
main: ./cmd/gobgpd/
binary: gobgpd
- ldflags: -s -extldflags "-static"
+ flags:
+ - -a
+ - -tags=netgo
+ ldflags: -s
goos:
- linux
goarch: