File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ CGO_ENABLED="${CGO_ENABLED:-0}"
3131# Set GO_LDFLAGS="-s" for building without symbols for debugging.
3232# shellcheck disable=SC2206
3333GO_LDFLAGS=(${GO_LDFLAGS:- } " -X=${VERSION_SYMBOL} =${GIT_SHA} " )
34+ GO_GCFLAGS=${GO_GCFLAGS:- }
3435GO_BUILD_ENV=(" CGO_ENABLED=${CGO_ENABLED} " " GO_BUILD_FLAGS=${GO_BUILD_FLAGS} " " GOOS=${GOOS} " " GOARCH=${GOARCH} " )
3536
3637etcd_build () {
@@ -46,6 +47,7 @@ etcd_build() {
4647 -trimpath \
4748 -installsuffix=cgo \
4849 " -ldflags=${GO_LDFLAGS[*]} " \
50+ -gcflags=" ${GO_GCFLAGS} " \
4951 -o=" ../${out} /etcd" . || return 2
5052 ) || return 2
5153
@@ -57,6 +59,7 @@ etcd_build() {
5759 -trimpath \
5860 -installsuffix=cgo \
5961 " -ldflags=${GO_LDFLAGS[*]} " \
62+ -gcflags=" ${GO_GCFLAGS} " \
6063 -o=" ../${out} /etcdutl" . || return 2
6164 ) || return 2
6265
@@ -68,6 +71,7 @@ etcd_build() {
6871 -trimpath \
6972 -installsuffix=cgo \
7073 " -ldflags=${GO_LDFLAGS[*]} " \
74+ -gcflags=" ${GO_GCFLAGS} " \
7175 -o=" ../${out} /etcdctl" . || return 2
7276 ) || return 2
7377 # Verify whether symbol we overwrote exists
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ RUN for d in server etcdutl etcdctl; do \
5151
5252# The instrumentation also adds a new main file which clashes with dummy.go found in non release-3.4 branches
5353RUN if [ -f "dummy.go" ]; then sed -i 's/package main_test/package main/' dummy.go; fi
54- RUN CGO_ENABLED=1 make build
54+ RUN CGO_ENABLED=1 GO_GCFLAGS= "all=-N -l" make build
5555RUN go install github.com/go-delve/delve/cmd/dlv@latest
5656
5757FROM ubuntu:24.04
You can’t perform that action at this time.
0 commit comments