From d6c1d4aa047bb394718b5c3bab037ec62bfc6058 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 17 Oct 2020 11:20:13 -0600 Subject: [PATCH] use Make + XGO to build static binaries. attempt #3 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2ae1d3f..95f3923 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ freebsd/386: GOARCH = 386 freebsd/386: CGO_ENABLED = 1 freebsd/386: mkdir -p /build - env + env @echo "building web binary (OS = $(OS), ARCH = $(ARCH))" go build -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -o /build/scrutiny-web-$(OS)-$(ARCH) -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go