From 2b7f68f3fe5fa22aa0d64122ab0b917aaf280066 Mon Sep 17 00:00:00 2001 From: wanghe-fit2cloud Date: Thu, 15 Jun 2023 23:33:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=9D=99=E6=80=81=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E4=B8=8D=E4=BE=9D=E8=B5=96=20glibc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .goreleaser.yaml | 3 --- Makefile | 10 +++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bc7a93342..0238a69c2 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,9 +16,6 @@ builds: - -trimpath ldflags: - -w -s - - --extldflags "-static -fpic" - tags: - - osusergo goos: - linux goarm: diff --git a/Makefile b/Makefile index 4784d390e..2bcf237a2 100644 --- a/Makefile +++ b/Makefile @@ -23,16 +23,16 @@ build_frontend: build_backend_on_linux: cd $(SERVER_PATH) \ - && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-static -fpic"' -tags 'osusergo,netgo' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) + && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) build_backend_on_darwin: cd $(SERVER_PATH) \ - && GOOS=linux GOARCH=amd64 $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-static -fpic"' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) + && GOOS=linux GOARCH=amd64 $(GOBUILD) -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) build_backend_on_archlinux: cd $(SERVER_PATH) \ - && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-fpic"' -tags osusergo -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) + && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) -build_all: build_frontend build_backend_on_linux +build_all: build_frontend build_backend_on_linux -build_on_local: clean_assets build_frontend build_backend_on_darwin upx_bin +build_on_local: clean_assets build_frontend build_backend_on_darwin upx_bin