Skip to content

Commit

Permalink
Merge pull request #4994 from jackchenjc/issue-4916-3
Browse files Browse the repository at this point in the history
fix: Only one ldflags flag is allowed
  • Loading branch information
cloudxxx8 authored Nov 8, 2024
2 parents 44a947b + fcb5d6c commit 86a4aa5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ MICROSERVICES= \
VERSION=$(shell cat ./VERSION 2>/dev/null || echo 0.0.0)
DOCKER_TAG=$(VERSION)-dev

GOFLAGS=-ldflags "-s -w -X github.com/edgexfoundry/edgex-go.Version=$(VERSION)" -trimpath -mod=readonly
GOTESTFLAGS?=-race

ifeq ($(ENABLE_FULL_RELRO), "true")
GOFLAGS += -ldflags "-bindnow"
ifeq ($(ENABLE_FULL_RELRO), true)
ENABLE_FULL_RELRO_GOFLAGS = -bindnow
endif

GOFLAGS=-ldflags "-s -w -X github.com/edgexfoundry/edgex-go.Version=$(VERSION) $(ENABLE_FULL_RELRO_GOFLAGS)" -trimpath -mod=readonly
GOTESTFLAGS?=-race

ifeq ($(ENABLE_PIE), "true")
GOFLAGS += -buildmode=pie
endif
Expand Down

0 comments on commit 86a4aa5

Please sign in to comment.