Skip to content

Commit 87f3848

Browse files
authored
Merge pull request #76 from segmentio/mckern/force-static-builds
Force extremely static builds
2 parents ab73469 + 8dc1947 commit 87f3848

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ifndef VERSION_REF
22
VERSION_REF ?= $(shell git describe --tags --always --dirty="-dev")
33
endif
44

5-
LDFLAGS := -ldflags='-s -w -X "main.VersionRef=$(VERSION_REF)"'
5+
LDFLAGS := -ldflags='-linkmode "external" -extldflags "-static" -s -w -X "main.VersionRef=$(VERSION_REF)"'
66
export GOFLAGS := -trimpath
77

88
GOFILES = $(shell find . -iname '*.go' | grep -v -e vendor -e _modules -e _cache -e /data/)

0 commit comments

Comments
 (0)