Skip to content

Commit

Permalink
Reduce arlon binary size( #233) (#247)
Browse files Browse the repository at this point in the history
* Reduce arlon binary size
  • Loading branch information
ShaunakJoshi1407 authored Sep 28, 2022
1 parent 3620e1c commit cada7dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ REPO_ORG ?= arlonproj
REPO_NAME ?= arlon
CAPI_VERSION := $(shell cat $(REPO_ROOT)$*/capirc)
CAPI_LD_FLAG := -X github.com/arlonproj/arlon/cmd/install.capiCoreProvider=$(CAPI_VERSION)
LD_FLAGS := $(CAPI_LD_FLAG)
LD_FLAGS := $(CAPI_LD_FLAG) -s -w
# Image URL to use all building/pushing image targets
IMG ?= $(REPO_SERVER)/$(REPO_ORG)/$(REPO_NAME)/controller:$(VERSION)
# Produce CRDs with multiversion enabled for v1 APIs - fixes failure in make test
Expand Down Expand Up @@ -69,7 +69,7 @@ clean:
rm -rf ./testbin; rm -rf ./bin

build: generate fmt vet cluster-config ## Build manager binary.
go build -o bin/arlon main.go
go build -ldflags '$(LD_FLAGS)' -o bin/arlon main.go

cluster-config:
mkdir -p bin
Expand Down

0 comments on commit cada7dd

Please sign in to comment.