Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Commit

Permalink
enforce static linking during build
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstanley committed Mar 16, 2018
1 parent 050ef43 commit 7bb6349
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Expand Up @@ -6,7 +6,6 @@ export $(PATH)

BINARY = marill
COMPRESS_CONC ?= $(shell nproc)
LD_FLAGS += -s -w
VERSION=$(shell git describe --tags --abbrev=0 2>/dev/null | sed -r "s:^v::g")
RSRC=README_TPL.md
ROUT=README.md
Expand Down Expand Up @@ -58,4 +57,4 @@ compress: ## Uses upx to compress release binaries (if installed, uses all cores
(which upx > /dev/null && find dist/*/* | xargs -I{} -n1 -P ${COMPRESS_CONC} upx --best "{}") || echo "not using upx for binary compression"

build: clean fetch generate ## Multi-step build process.
go build -ldflags "${LD_FLAGS}" -x -v -o ${BINARY}
CGO_ENABLED=0 go build -ldflags '-d -s -w' -tags netgo -installsuffix netgo -v -o "${BINARY}"

0 comments on commit 7bb6349

Please sign in to comment.