From 5116787e39c1c241f3cededd1fbb2b3025b03b87 Mon Sep 17 00:00:00 2001 From: moloch-- <875022+moloch--@users.noreply.github.com> Date: Mon, 6 May 2024 17:39:18 -0700 Subject: [PATCH] Disable CGO --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 8234421..3dd2aca 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ GO_VERSION = $(shell $(GO) version) GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1) GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2) MIN_SUPPORTED_GO_MAJOR_VERSION = 1 -MIN_SUPPORTED_GO_MINOR_VERSION = 18 +MIN_SUPPORTED_GO_MINOR_VERSION = 21 GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MIN_SUPPORTED_GO_MAJOR_VERSION).$(MIN_SUPPORTED_GO_MINOR_VERSION) VERSION_HEADER ?= 1 @@ -31,16 +31,16 @@ LDFLAGS = "-s -w -X $(API_PKG).VersionHeader=$(VERSION_HEADER)" .PHONY: armory-server armory-server: - $(GO) build -o armory-server -trimpath -ldflags $(LDFLAGS) . + CGO_ENABLED=0 $(GO) build -o armory-server -trimpath -ldflags $(LDFLAGS) . .PHONY: release release: mkdir -p ./release - GOOS=linux GOARCH=amd64 $(GO) build -o ./release/armory-server_linux-amd64 -trimpath -ldflags $(LDFLAGS) . - GOOS=linux GOARCH=arm64 $(GO) build -o ./release/armory-server_linux-arm64 -trimpath -ldflags $(LDFLAGS) . - GOOS=darwin GOARCH=amd64 $(GO) build -o ./release/armory-server_macos-amd64 -trimpath -ldflags $(LDFLAGS) . - GOOS=darwin GOARCH=arm64 $(GO) build -o ./release/armory-server_macos-arm64 -trimpath -ldflags $(LDFLAGS) . - GOOS=windows GOARCH=amd64 $(GO) build -o ./release/armory-server_windows.exe -trimpath -ldflags $(LDFLAGS) . + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -o ./release/armory-server_linux-amd64 -trimpath -ldflags $(LDFLAGS) . + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -o ./release/armory-server_linux-arm64 -trimpath -ldflags $(LDFLAGS) . + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GO) build -o ./release/armory-server_macos-amd64 -trimpath -ldflags $(LDFLAGS) . + CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(GO) build -o ./release/armory-server_macos-arm64 -trimpath -ldflags $(LDFLAGS) . + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GO) build -o ./release/armory-server_windows.exe -trimpath -ldflags $(LDFLAGS) . clean: rm -f ./armory-server