From fd1d688b29e2e305b2b3fbf9d4bf90a15416e040 Mon Sep 17 00:00:00 2001 From: Marc Paquette Date: Tue, 6 Sep 2022 19:22:08 +0000 Subject: [PATCH] Statically compile `gdn` to address #233 --- ci/scripts/gdn-linux-standalone | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/scripts/gdn-linux-standalone b/ci/scripts/gdn-linux-standalone index 6e075299..b9edafd9 100755 --- a/ci/scripts/gdn-linux-standalone +++ b/ci/scripts/gdn-linux-standalone @@ -26,7 +26,7 @@ git config --global --add safe.directory '*' # If you want to fly execute this, you will have to pass DEV_MODE=true if [ -z "$DEV_MODE" ]; then gdn_version=$(cd gr-release-develop/src/guardian && git rev-parse HEAD) - gdn_build_ldflags="-X main.version=${gdn_version}" + gdn_build_ldflags="-X main.version=${gdn_version} -extldflags=-static" fi # shellcheck source=../helpers/device-control @@ -92,7 +92,7 @@ function build() { cd gr-release-develop/src/guardian # must be built with 'daemon' flag because of docker packages :| - go build \ + CGO_ENABLED=0 go build \ -mod vendor \ -tags daemon \ -o "${basedir}/binary/gdn" \