Skip to content
Myr

[make] Reduce the size of the binaries with `-ldflags -w`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 6d235bc · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Related: #555

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/Makefile+3 added-3 removed
45 unmodified lines
46 cd $(SRCDIR) && go get4748android-build: $(SRCDIR)49 cd $(SRCDIR) && GOARCH=arm GOARM=7 CGO_ENABLED=1 go get50 cd $(SRCDIR)/fzf && GOARCH=arm GOARM=7 CGO_ENABLED=1 go build -a -ldflags="-extldflags=-pie" -o $(BINARYARM7)50 cd $(SRCDIR)/fzf && GOARCH=arm GOARM=7 CGO_ENABLED=1 go build -a -ldflags="-w -extldflags=-pie" -o $(BINARYARM7)51 cd $(SRCDIR)/fzf && cp $(BINARYARM7) $(RELEASEARM7) && tar -czf $(RELEASEARM7).tgz $(RELEASEARM7) && \52 rm -f $(RELEASEARM7)5354test: deps
7 unmodified lines
62clean:63 cd fzf && rm -f fzf-*6465fzf/$(BINARY32): deps66 cd fzf && GOARCH=386 CGO_ENABLED=1 go build -a -tags "$(TAGS)" -o $(BINARY32)66 cd fzf && GOARCH=386 CGO_ENABLED=1 go build -a -ldflags -w -tags "$(TAGS)" -o $(BINARY32)6768fzf/$(BINARY64): deps69 cd fzf && go build -a -tags "$(TAGS)" -o $(BINARY64)69 cd fzf && go build -a -ldflags -w -tags "$(TAGS)" -o $(BINARY64)7071$(BINDIR)/fzf: fzf/$(BINARY) | $(BINDIR)72 cp -f fzf/$(BINARY) $(BINDIR)73 cd $(BINDIR) && ln -sf $(BINARY) fzf
43 unmodified lines