0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-15 18:25:15 +01:00

Makefile: Enable CGO on non-arm

CGO is required for tests that use -race as well as some other build
options.

On arm64 the build fails when CGO is enabled because of some assembly
error.
This commit is contained in:
Michal Suchanek 2025-12-03 20:19:16 +01:00
parent b49dd8e32f
commit cc0298d955

View File

@ -50,9 +50,10 @@ ifeq ($(HAS_GO), yes)
CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS) CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
endif endif
CGO_ENABLED ?= 0 ifeq (arm64,$(shell $(GO) env GOARCH))
ifneq (,$(findstring sqlite,$(TAGS))$(findstring pam,$(TAGS))) CGO_ENABLED ?= 0
CGO_ENABLED = 1 else
CGO_ENABLED ?= 1
endif endif
STATIC ?= STATIC ?=