From 7709115afe01048431c23900c9a091472d6c36eb Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 1 Aug 2017 16:43:42 +0100 Subject: [PATCH] Allow setting of compiler options To allow e.g. building a static binary with: make binaries GO_GCFLAGS="--ldflags '-extldflags \"-fno-PIC -static\"'" Signed-off-by: Ian Campbell --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 630e4851b..3d82c5f34 100644 --- a/Makefile +++ b/Makefile @@ -70,10 +70,11 @@ boiler: cri-containerd: check-gopath $(GO) build -o $(BUILD_DIR)/$@ \ $(BUILD_TAGS) \ + $(GO_LDFLAGS) $(GO_GCFLAGS) \ $(PROJECT)/cmd/cri-containerd test: - go test -timeout=10m -race ./pkg/... $(BUILD_TAGS) + go test -timeout=10m -race ./pkg/... $(BUILD_TAGS) $(GO_LDFLAGS) $(GO_GCFLAGS) test-cri: @./hack/test-cri.sh