From 33a4fd6fbe5430ea9672e9fea1a8ac7acbc7ae11 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 15 Feb 2018 12:24:56 -0500 Subject: [PATCH] build: Add -i flag to go build It got accidentally dropped, but is crucial for happiness. See: https://purpleidea.com/blog/2017/02/26/faster-golang-builds/ --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8de58519..48d071d9 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ GOARCH=$(lastword $(subst -, ,$*)) build/mgmt-%: $(GO_FILES) | bindata lang @echo "Building: $(PROGRAM), os/arch: $*, version: $(SVERSION)..." @# reassigning GOOS and GOARCH to make build command copy/pastable - env GOOS=${GOOS} GOARCH=${GOARCH} time go build -ldflags "-X main.program=$(PROGRAM) -X main.version=$(SVERSION) ${LDFLAGS}" -o $@ $(BUILD_FLAGS); + env GOOS=${GOOS} GOARCH=${GOARCH} time go build -i -ldflags "-X main.program=$(PROGRAM) -X main.version=$(SVERSION) ${LDFLAGS}" -o $@ $(BUILD_FLAGS); # create a list of binary file names to use as make targets crossbuild_targets = $(addprefix build/mgmt-,$(subst /,-,${GOOSARCHES}))