Skip to content

Commit

Permalink
use netgo
Browse files Browse the repository at this point in the history
  • Loading branch information
blxdyx committed Apr 11, 2024
1 parent 39518bb commit abed4f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w

- id: darwin-arm64
Expand All @@ -25,7 +25,7 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w

- id: linux-amd64
Expand All @@ -36,7 +36,7 @@ builds:
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w -extldflags "-static" # We need to build a static binary because we are building in a glibc based system and running in a musl container

- id: linux-arm64
Expand All @@ -47,7 +47,7 @@ builds:
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w -extldflags "-static" # We need to build a static binary because we are building in a glibc based system and running in a musl container

- id: windows-amd64
Expand All @@ -58,7 +58,7 @@ builds:
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w


Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ifeq ($(shell uname -s), Darwin)
endif

# about netgo see: https://github.com/golang/go/issues/30310#issuecomment-471669125 and https://github.com/golang/go/issues/57757
BUILD_TAGS = nosqlite,noboltdb
BUILD_TAGS = nosqlite,noboltdb,netgo

ifneq ($(shell "$(CURDIR)/turbo/silkworm/silkworm_compat_check.sh"),)
BUILD_TAGS := $(BUILD_TAGS),nosilkworm
Expand Down
2 changes: 1 addition & 1 deletion wmake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ $Erigon.Commit = [string]@(git.exe rev-list -1 HEAD)
$Erigon.Branch = [string]@(git.exe rev-parse --abbrev-ref HEAD)
$Erigon.Tag = [string]@(git.exe describe --tags)

$Erigon.BuildTags = "nosqlite,noboltdb"
$Erigon.BuildTags = "nosqlite,noboltdb,netgo"
$Erigon.Package = "github.com/ledgerwatch/erigon"

$Erigon.BuildFlags = "-trimpath -tags $($Erigon.BuildTags) -buildvcs=false -v"
Expand Down

0 comments on commit abed4f5

Please sign in to comment.