makefile: compile cgo with -O2

This commit is contained in:
mappu 2024-06-30 12:45:40 +12:00
parent abcf7dbfe5
commit a7dd1ca340

View File

@ -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