Release build misses -s -w flag #13894

Closed
opened 2025-11-02 10:56:25 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @wxiaoguang on GitHub (Dec 29, 2024).

@techknowlogick

$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
	CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

.PHONY: release-linux
release-linux: | $(DIST_DIRS)
	CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
Originally created by @wxiaoguang on GitHub (Dec 29, 2024). @techknowlogick ``` $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ) CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ .PHONY: release-linux release-linux: | $(DIST_DIRS) CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) . ```
GiteaMirror added the topic/build label 2025-11-02 10:56:25 -06:00
Author
Owner

@techknowlogick commented on GitHub (Dec 30, 2024):

thanks. I've just created https://github.com/go-gitea/gitea/pull/33041 and I've included those flags for the windows, darwin, and freebsd releases too.

@techknowlogick commented on GitHub (Dec 30, 2024): thanks. I've just created https://github.com/go-gitea/gitea/pull/33041 and I've included those flags for the windows, darwin, and freebsd releases too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13894