Speed up successive builds

By saving the packages that are dependencies of runc, successive build
times can be decreased by over 50%.

Signed-off-by: Ido Yariv <ido@wizery.com>
This commit is contained in:
Ido Yariv 2016-04-09 09:57:26 -04:00
parent 77ce689fe0
commit 80cf52436a
1 changed files with 3 additions and 2 deletions

View File

@ -12,10 +12,10 @@ export GOPATH:=$(CURDIR)/Godeps/_workspace
.PHONY=dbuild
all: $(RUNC_LINK)
go build -ldflags "-X main.gitCommit=${COMMIT}" -tags "$(BUILDTAGS)" -o runc .
go build -i -ldflags "-X main.gitCommit=${COMMIT}" -tags "$(BUILDTAGS)" -o runc .
static: $(RUNC_LINK)
CGO_ENABLED=1 go build -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT}" -o runc .
CGO_ENABLED=1 go build -i -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT}" -o runc .
$(RUNC_LINK):
ln -sfn $(CURDIR) $(RUNC_LINK)
@ -49,6 +49,7 @@ uninstall:
clean:
rm -f runc
rm -f $(RUNC_LINK)
rm -rf $(GOPATH)/pkg
validate:
script/validate-gofmt