!251 add Go build flags

From: @gaoruoshu
Reviewed-by: @xiezhipeng1,@hanxinke
Signed-off-by: @hanxinke
This commit is contained in:
openeuler-ci-bot
2020-12-28 14:24:41 +08:00
committed by Gitee
2 changed files with 4 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ SRCVERSION = $(shell git rev-parse --short HEAD 2>/dev/null)
ATUNEVERSION = $(VERSION)$(if $(SRCVERSION),($(SRCVERSION)))
GOLDFLAGS += -X gitee.com/openeuler/A-Tune/common/config.Version=$(ATUNEVERSION)
GOFLAGS = -ldflags "$(GOLDFLAGS)"
GOFLAGS = -ldflags '-s -w -extldflags "-static" -extldflags "-zrelro" -extldflags "-znow" -extldflags "-ftrapv" $(GOLDFLAGS)'
CERT_PATH=$(DESTDIR)/etc/atuned
GRPC_CERT_PATH=$(CERT_PATH)/grpc_certs

View File

@@ -144,6 +144,9 @@ make models
%systemd_postun_with_restart atuned.service
%changelog
* Sat Dec 26 2020 gaoruoshu<gaoruoshu@huawei.com> - 0.3-0.3
- add security Go compile flags
* Sat Nov 28 2020 hanxinke<hanxinke@huawei.com> - 0.3-0.2
- The engine package conflicts with atune < 0.3-0.1.