Added flags '-s -w' to buildflags#3742
Merged
ebuchman merged 5 commits intotendermint:developfrom Jun 24, 2019
tac0turtle:marko/reduce_binary-size
Merged
Added flags '-s -w' to buildflags#3742ebuchman merged 5 commits intotendermint:developfrom tac0turtle:marko/reduce_binary-size
ebuchman merged 5 commits intotendermint:developfrom
tac0turtle:marko/reduce_binary-size
Conversation
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
Codecov Report
@@ Coverage Diff @@
## develop #3742 +/- ##
==========================================
- Coverage 63.95% 63.9% -0.05%
==========================================
Files 241 241
Lines 19996 19994 -2
==========================================
- Hits 12788 12777 -11
- Misses 6162 6171 +9
Partials 1046 1046
|
Contributor
|
People who want to use debuggers (developers) should be able to build binaries without |
Contributor
|
I'd rather do something conditional like the following: So that such flags can be added back in by just (Sent from mobile - excuse the brevity) |
tac0turtle
commented
Jun 23, 2019
alessio
reviewed
Jun 24, 2019
alessio
approved these changes
Jun 24, 2019
melekes
suggested changes
Jun 24, 2019
ebuchman
approved these changes
Jun 24, 2019
Makefile
Outdated
| BUILD_FLAGS = -X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD` | ||
|
|
||
| ifeq ($(NOSTRIP),) | ||
| BUILD_FLAGS += -s -w |
Contributor
There was a problem hiding this comment.
Need to document this in the build instructions
melekes
reviewed
Jun 24, 2019
melekes
approved these changes
Jun 24, 2019
ebuchman
approved these changes
Jun 24, 2019
unclezoro
pushed a commit
to unclezoro/tendermint
that referenced
this pull request
Sep 6, 2019
* Added flags '-s -w' to buildflags Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * added a condition for no strip * minor changes * on call discussions * on call discussion v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref #1182
-s -wreduces the binary size by removing symbols that are only used by debuggers. All panics, stacktraces, etc. stay the same.- -s : Omit the symbol table and debug information.
- -w : Omit the DWARF symbol table.
The reduction in the size of the binary is 18%, this primarily comes from removing the DWARF symbol table.
Ran go mod tidy on the repo to help clean up the go.mod file