add compile-time flag to disable Go GC (MR 56)

I hate this, but it's the only good way I could find to allow working around this ugly QEMU bug:
https://gitlab.com/qemu-project/qemu/-/issues/2560
This commit is contained in:
Clayton Craft
2024-09-28 08:11:19 -07:00
parent 741c0553d5
commit d63e600614
2 changed files with 13 additions and 0 deletions

View File

@@ -13,6 +13,11 @@ GOFLAGS?=
LDFLAGS+=-s -w -X main.Version=$(VERSION)
RM?=rm -f
GOTEST=go test -count=1 -race
DISABLE_GOGC?=
ifeq ($(DISABLE_GOGC),1)
LDFLAGS+=-X main.DisableGC=true
endif
GOSRC!=find * -name '*.go'
GOSRC+=go.mod go.sum