aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-04-05 20:28:18 +0800
committerGitHub <noreply@github.com>2020-04-05 20:28:18 +0800
commit686850e21f7561b002a4ffce3b9d221665c06377 (patch)
treefe25decc7a3f620feb971025ed14adeae4bf52be /Makefile
parentbaadb51445b1d990f72a37b0ef7575f5ed72824a (diff)
downloadgitea-686850e21f7561b002a4ffce3b9d221665c06377.tar.gz
gitea-686850e21f7561b002a4ffce3b9d221665c06377.zip
Fix cross compile (#10952)
* Fix cross compile * Add test for cross compile * Fix drone * Fix drone * Also prevent CC environment not to generate Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f023408754..df786dccb6 100644
--- a/Makefile
+++ b/Makefile
@@ -481,7 +481,7 @@ backend: go-check generate $(EXECUTABLE)
.PHONY: generate
generate: $(TAGS_PREREQ)
- $(GO) generate -mod=vendor -tags '$(TAGS)' $(GO_PACKAGES)
+ CC= GOOS= GOARCH= $(GO) generate -mod=vendor -tags '$(TAGS)' $(GO_PACKAGES)
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
$(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@