Makefile: Fix LDFLAGS overriding

When distributions build software it's desirable to have the ability to
define own linker flags, or Go flags. As `-ldflags` defined in `go
build` overrides `-ldflags` defined in the env variable `GOFLAGS`, there
is a distinct need to be able to replace the default values with new
ones or append to them.

Fixes #8645

Signed-off-by: Morten Linderud <morten@linderud.pw>
pull/8678/head
Morten Linderud 4 years ago
parent ac983a644b
commit f917c169d0
No known key found for this signature in database
GPG Key ID: E742683BA08CB2FF

@ -49,6 +49,7 @@ endif
LDFLAGS += -X helm.sh/helm/v3/internal/version.metadata=${VERSION_METADATA}
LDFLAGS += -X helm.sh/helm/v3/internal/version.gitCommit=${GIT_COMMIT}
LDFLAGS += -X helm.sh/helm/v3/internal/version.gitTreeState=${GIT_DIRTY}
LDFLAGS += $(EXT_LDFLAGS)
.PHONY: all
all: build

Loading…
Cancel
Save