Merge pull request #114 from ijc/build-flags
Allow setting of compiler options
This commit is contained in:
commit
8d0c896794
8
Makefile
8
Makefile
@ -34,6 +34,7 @@ help:
|
|||||||
@echo
|
@echo
|
||||||
@echo " * 'install' - Install binaries to system locations"
|
@echo " * 'install' - Install binaries to system locations"
|
||||||
@echo " * 'binaries' - Build cri-containerd"
|
@echo " * 'binaries' - Build cri-containerd"
|
||||||
|
@echo " * 'static-binaries - Build static cri-containerd"
|
||||||
@echo " * 'test' - Test cri-containerd"
|
@echo " * 'test' - Test cri-containerd"
|
||||||
@echo " * 'test-cri' - Test cri-containerd with cri validation test"
|
@echo " * 'test-cri' - Test cri-containerd with cri validation test"
|
||||||
@echo " * 'clean' - Clean artifacts"
|
@echo " * 'clean' - Clean artifacts"
|
||||||
@ -70,10 +71,11 @@ boiler:
|
|||||||
cri-containerd: check-gopath
|
cri-containerd: check-gopath
|
||||||
$(GO) build -o $(BUILD_DIR)/$@ \
|
$(GO) build -o $(BUILD_DIR)/$@ \
|
||||||
$(BUILD_TAGS) \
|
$(BUILD_TAGS) \
|
||||||
|
$(GO_LDFLAGS) $(GO_GCFLAGS) \
|
||||||
$(PROJECT)/cmd/cri-containerd
|
$(PROJECT)/cmd/cri-containerd
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -timeout=10m -race ./pkg/... $(BUILD_TAGS)
|
go test -timeout=10m -race ./pkg/... $(BUILD_TAGS) $(GO_LDFLAGS) $(GO_GCFLAGS)
|
||||||
|
|
||||||
test-cri:
|
test-cri:
|
||||||
@./hack/test-cri.sh
|
@./hack/test-cri.sh
|
||||||
@ -83,6 +85,9 @@ clean:
|
|||||||
|
|
||||||
binaries: cri-containerd
|
binaries: cri-containerd
|
||||||
|
|
||||||
|
static-binaries: GO_LDFLAGS=--ldflags '-extldflags "-fno-PIC -static"'
|
||||||
|
static-binaries: cri-containerd
|
||||||
|
|
||||||
install: check-gopath
|
install: check-gopath
|
||||||
install -D -m 755 $(BUILD_DIR)/cri-containerd $(BINDIR)/cri-containerd
|
install -D -m 755 $(BUILD_DIR)/cri-containerd $(BINDIR)/cri-containerd
|
||||||
|
|
||||||
@ -117,6 +122,7 @@ install.tools: .install.gitvalidation .install.gometalinter
|
|||||||
|
|
||||||
.PHONY: \
|
.PHONY: \
|
||||||
binaries \
|
binaries \
|
||||||
|
static-binaries \
|
||||||
boiler \
|
boiler \
|
||||||
clean \
|
clean \
|
||||||
default \
|
default \
|
||||||
|
Loading…
Reference in New Issue
Block a user