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/
This commit is contained in:
2
Makefile
2
Makefile
@@ -142,7 +142,7 @@ GOARCH=$(lastword $(subst -, ,$*))
|
|||||||
build/mgmt-%: $(GO_FILES) | bindata lang
|
build/mgmt-%: $(GO_FILES) | bindata lang
|
||||||
@echo "Building: $(PROGRAM), os/arch: $*, version: $(SVERSION)..."
|
@echo "Building: $(PROGRAM), os/arch: $*, version: $(SVERSION)..."
|
||||||
@# reassigning GOOS and GOARCH to make build command copy/pastable
|
@# 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
|
# create a list of binary file names to use as make targets
|
||||||
crossbuild_targets = $(addprefix build/mgmt-,$(subst /,-,${GOOSARCHES}))
|
crossbuild_targets = $(addprefix build/mgmt-,$(subst /,-,${GOOSARCHES}))
|
||||||
|
|||||||
Reference in New Issue
Block a user