From a7dd1ca34043aee5e44ac48848d7c4a8cbc4e111 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 30 Jun 2024 12:45:40 +1200 Subject: [PATCH] makefile: compile cgo with -O2 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index df928fb..2e6994d 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,11 @@ liblcl.dll: liblcl-2.2.3.zip touch liblcl.dll yvbolt: $(SOURCES) - GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -trimpath -ldflags '-s -w' + CGO_CFLAGS='-O2 -Wno-return-local-addr' GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -trimpath -ldflags '-s -w' chmod 755 yvbolt yvbolt.exe: $(SOURCES) - GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -trimpath -ldflags '-s -w -H windowsgui' + CGO_CFLAGS='-O2 -Wno-return-local-addr' GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -trimpath -ldflags '-s -w -H windowsgui' upx --lzma yvbolt.exe yvbolt.linux64.tar.xz: yvbolt liblcl.so