Skip to content

Commit e64d6e3

Browse files
committed
Allow providing (additional) custom GO_LDFLAGS
Makefile: Allow providing `GO_LDFLAGS` externally (e.g. via export of the variable in the build environment), which is what downstream distributions use to build with their linker flags (e.g. for external link mode and/or debug packages). This prepends externally provided `GO_LDFLAGS` to the version declaration.
1 parent 664ef74 commit e64d6e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ PROJECT := github.com/kubernetes-sigs/cri-tools
3434
BINDIR ?= /usr/local/bin
3535

3636
VERSION ?= $(shell git describe --tags --dirty --always | sed 's/^v//')
37-
GO_LDFLAGS := -X $(PROJECT)/pkg/version.Version=$(VERSION)
37+
GO_LDFLAGS := $(GO_LDFLAGS) -X $(PROJECT)/pkg/version.Version=$(VERSION)
3838

3939
BUILD_PATH := $(shell pwd)/build
4040
BUILD_BIN_PATH := $(BUILD_PATH)/bin/$(GOOS)/$(GOARCH)

0 commit comments

Comments
 (0)