From 1f95fa818f6fc6e3124e5d025b2fbf04e2046de7 Mon Sep 17 00:00:00 2001 From: TobiLG Date: Tue, 24 Apr 2018 15:03:37 +0200 Subject: [PATCH] Enable static builds --- build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 24cd5d5f..c8a1b15a 100755 --- a/build.sh +++ b/build.sh @@ -132,10 +132,10 @@ fi pkg/core/gen.sh # build and store objects into original directory. -go build -ldflags "$LDFLAGS" -o "$OD/tile38-server" cmd/tile38-server/*.go -go build -ldflags "$LDFLAGS" -o "$OD/tile38-cli" cmd/tile38-cli/*.go -go build -ldflags "$LDFLAGS" -o "$OD/tile38-benchmark" cmd/tile38-benchmark/*.go -go build -ldflags "$LDFLAGS" -o "$OD/tile38-luamemtest" cmd/tile38-luamemtest/*.go +CGO_ENABLED=0 go build -ldflags "$LDFLAGS -extldflags '-static'" -o "$OD/tile38-server" cmd/tile38-server/*.go +CGO_ENABLED=0 go build -ldflags "$LDFLAGS -extldflags '-static'" -o "$OD/tile38-cli" cmd/tile38-cli/*.go +CGO_ENABLED=0 go build -ldflags "$LDFLAGS -extldflags '-static'" -o "$OD/tile38-benchmark" cmd/tile38-benchmark/*.go +CGO_ENABLED=0 go build -ldflags "$LDFLAGS -extldflags '-static'" -o "$OD/tile38-luamemtest" cmd/tile38-luamemtest/*.go # test if requested if [ "$1" == "test" ]; then