diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-05-18 13:29:09 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-05-18 13:29:27 +0900 |
commit | 70245ad98cb3fa8d2c13b882e615317488ccbdc0 (patch) | |
tree | 6b8d9922bbd8969ffe598f5a54a113a3a43a77a2 | |
parent | 6d235bceee66bd6b7ca2de8311a3deae4793bfa8 (diff) |
[make] Reduce the size of the binaries with `-ldflags -w`
Related: #555
-rw-r--r-- | src/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile index 59803861..f7aa0b2d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -47,7 +47,7 @@ deps: $(SRCDIR) $(SOURCES) android-build: $(SRCDIR) cd $(SRCDIR) && GOARCH=arm GOARM=7 CGO_ENABLED=1 go get - cd $(SRCDIR)/fzf && GOARCH=arm GOARM=7 CGO_ENABLED=1 go build -a -ldflags="-extldflags=-pie" -o $(BINARYARM7) + cd $(SRCDIR)/fzf && GOARCH=arm GOARM=7 CGO_ENABLED=1 go build -a -ldflags="-w -extldflags=-pie" -o $(BINARYARM7) cd $(SRCDIR)/fzf && cp $(BINARYARM7) $(RELEASEARM7) && tar -czf $(RELEASEARM7).tgz $(RELEASEARM7) && \ rm -f $(RELEASEARM7) @@ -63,10 +63,10 @@ clean: cd fzf && rm -f fzf-* fzf/$(BINARY32): deps - cd fzf && GOARCH=386 CGO_ENABLED=1 go build -a -tags "$(TAGS)" -o $(BINARY32) + cd fzf && GOARCH=386 CGO_ENABLED=1 go build -a -ldflags -w -tags "$(TAGS)" -o $(BINARY32) fzf/$(BINARY64): deps - cd fzf && go build -a -tags "$(TAGS)" -o $(BINARY64) + cd fzf && go build -a -ldflags -w -tags "$(TAGS)" -o $(BINARY64) $(BINDIR)/fzf: fzf/$(BINARY) | $(BINDIR) cp -f fzf/$(BINARY) $(BINDIR) |