Skip to content

Commit 2176e52

Browse files
authored
Merge pull request #978 from starius/static-binaries
make: set CGO_ENABLED=0
2 parents 6b71582 + b005138 commit 2176e52

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ GOIMPORTS_PKG := github.com/rinchsan/gosimports/cmd/gosimports
1111
GO_BIN := ${GOPATH}/bin
1212
GOIMPORTS_BIN := $(GO_BIN)/gosimports
1313

14-
GOBUILD := GO111MODULE=on go build -v
15-
GOINSTALL := GO111MODULE=on go install -v
14+
GOBUILD := CGO_ENABLED=0 GO111MODULE=on go build -v
15+
GOINSTALL := CGO_ENABLED=0 GO111MODULE=on go install -v
1616
GOMOD := GO111MODULE=on go mod
1717

1818
COMMIT := $(shell git describe --abbrev=40 --dirty --tags)

release.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ for i in $SYS; do
9898
cd $PACKAGE-$i-$TAG
9999

100100
echo "Building:" $OS $ARCH $ARM
101-
env GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -ldflags "$COMMITFLAGS" github.com/lightninglabs/loop/cmd/loop
102-
env GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -ldflags "$COMMITFLAGS" github.com/lightninglabs/loop/cmd/loopd
101+
for bin in loop loopd; do
102+
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -ldflags "$COMMITFLAGS" "github.com/lightninglabs/loop/cmd/$bin"
103+
done
103104
cd ..
104105

105106
if [[ $OS = "windows" ]]; then

0 commit comments

Comments
 (0)