mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Add -s & -w flags to omit various symbol tables from the binary.
This does not effect backtraces. Before the scope binary was 49M, now its 32M. For more detauls, see https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/
This commit is contained in:
2
Makefile
2
Makefile
@@ -29,7 +29,7 @@ GO_HOST=$(NO_CROSS_COMP); $(GO)
|
||||
WITH_GO_HOST_ENV=$(NO_CROSS_COMP); $(GO_ENV)
|
||||
GO_BUILD_INSTALL_DEPS=-i
|
||||
GO_BUILD_TAGS='netgo unsafe'
|
||||
GO_BUILD_FLAGS=$(GO_BUILD_INSTALL_DEPS) -ldflags "-extldflags \"-static\" -X main.version=$(SCOPE_VERSION)" -tags $(GO_BUILD_TAGS)
|
||||
GO_BUILD_FLAGS=$(GO_BUILD_INSTALL_DEPS) -ldflags "-extldflags \"-static\" -X main.version=$(SCOPE_VERSION) -s -w" -tags $(GO_BUILD_TAGS)
|
||||
|
||||
|
||||
all: $(SCOPE_EXPORT)
|
||||
|
||||
Reference in New Issue
Block a user