Skip to content

Commit

Permalink
Build using netgo tag (ethereum#275)
Browse files Browse the repository at this point in the history
This will create a static build using Go native networking stack.

Checked and it works stable for all archs and distros.
  • Loading branch information
vcastellm authored Dec 27, 2021
1 parent d5d639d commit fbd2de7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
tags:
- netgo
ldflags:
-s -w

Expand All @@ -29,6 +31,8 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
tags:
- netgo
ldflags:
-s -w

Expand All @@ -42,9 +46,11 @@ builds:
env:
- CC=gcc
- CXX=g++
tags:
- netgo
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static"
-s -w -extldflags "-static"

- id: linux-arm64
main: ./cmd/geth
Expand All @@ -56,9 +62,11 @@ builds:
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
tags:
- netgo
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static"
-s -w -extldflags "-static"

nfpms:
- vendor: 0xPolygon
Expand Down

0 comments on commit fbd2de7

Please sign in to comment.