From 5905b3478d01a834c453759c20ec2d3278941a89 Mon Sep 17 00:00:00 2001 From: Evan Hosinski Date: Tue, 7 Apr 2026 09:10:49 -0400 Subject: [PATCH] Altered makefile to add new ldflags to remove debug info --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 25beba7..cffa0ce 100644 --- a/Makefile +++ b/Makefile @@ -30,14 +30,14 @@ clean: # Build for current platform build: - CGO_ENABLED=0 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME) -ldflags "-X main.version=$(VERSION)" crowsnest.go + CGO_ENABLED=0 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME) -ldflags "-X main.version=$(VERSION) -s -w" crowsnest.go # Build for all platforms build-all: clean @for platform in $(PLATFORMS); do \ for arch in $(ARCHS); do \ echo "Building for $$platform/$$arch..."; \ - GOOS=$$platform GOARCH=$$arch CGO_ENABLED=0 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch -ldflags "-X main.version=$(VERSION)" crowsnest.go; \ + GOOS=$$platform GOARCH=$$arch CGO_ENABLED=0 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch -ldflags "-X main.version=$(VERSION) -s -w" crowsnest.go; \ if [ "$$platform" = "windows" ]; then \ mv $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch.exe; \ fi; \