From 44c3814b0814d64d104ddb0605fad46be8d0b06f Mon Sep 17 00:00:00 2001 From: zhuguodong Date: Thu, 24 Dec 2020 08:06:38 +0000 Subject: [PATCH] makefile change --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 68f6252..b54458c 100755 --- a/Makefile +++ b/Makefile @@ -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 @@ -29,7 +29,7 @@ atuned: go build -mod=vendor -v $(GOFLAGS) -o $(PKGPATH)/atuned cmd/atuned/*.go modules: - cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -buildmode=plugin -o ${CURDIR}/pkg/daemon_profile_server.so *.go + cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -buildmode=plugin $(GOFLAGS) -o ${CURDIR}/pkg/daemon_profile_server.so *.go clean: rm -rf $(PKGPATH)/* -- 2.27.0