From fb3bacc48e62cb871bf937f48c4743aeb8696e98 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 18 Sep 2021 16:39:04 +0200 Subject: Updated static build instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce4ba8d..3e81852 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,12 @@ go build ./cmd/trains-webui/ For a release build, use : ``` -go build -ldflags="-s -w" ./cmd/trains-webui/ +go build -ldflags '-s -w -extldflags "-static"' ./cmd/trains-webui/ ``` To cross-compile for another os or architecture, use : ``` -GOOS=openbsd GOARCH=amd64 go build -ldflags="-s -w" ./cmd/trains-webui/ +GOOS=openbsd GOARCH=amd64 go build -ldflags='-s -w -extldflags "-static"' ./cmd/trains-webui/ ``` ## Design Choices -- cgit v1.2.3