diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2022-01-25 17:38:22 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2022-01-26 22:11:12 +0300 |
commit | 783ec4e5328ac4106fc1f1e931e5fde7c9bc95af (patch) | |
tree | fa1947074355d21f72ef97fa8f5c033f573623a5 /Makefile.internal.mk | |
parent | 58a67cf0f0152a87b4944c92c701be602ac33c2e (diff) |
Add a Gnu build-id to gitlab-pages binary
By default go binaries only include a Go build-id. Which is
deterministic and unique.
They don't include a Gnu build-id that should have the same
properties.
The Gnu build-id is used by several observably tools including
perf. Having a Gnu build-id allow these tools to uniquely identify a
binary and avoid conflicts when resolving debug symbols for those
binaries.
We're generating a Gnu build-id from the Go build-id, that way we're
sure to also have a deterministic and unique build-id. We do this by
compiling the binary once, getting the Go build-id from that, and then
re-building including a Gnu build-id.
Diffstat (limited to 'Makefile.internal.mk')
-rw-r--r-- | Makefile.internal.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.internal.mk b/Makefile.internal.mk index e1454db8..d2340855 100644 --- a/Makefile.internal.mk +++ b/Makefile.internal.mk @@ -8,7 +8,7 @@ ifneq (v$(VERSION),$(LAST_TAG)) VERSION := $(shell echo $(VERSION)~beta.$(COMMITS).g$(REVISION)) endif -VERSION_FLAGS := -ldflags='-X "main.VERSION=$(VERSION)" -X "main.REVISION=$(REVISION)"' +VERSION_FLAGS :=-X "main.VERSION=$(VERSION)" -X "main.REVISION=$(REVISION)" _allpackages = $(shell (go list ./... | \ grep -v $(addprefix -e ,$(IGNORED_DIRS)))) |