-
Notifications
You must be signed in to change notification settings - Fork 1.4k
✨ Disable DWARF and symbol table to decrease binary/image size #12856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
✨ Disable DWARF and symbol table to decrease binary/image size #12856
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
94918a9 to
e8d6c73
Compare
This commit introduces DBG variable which is used to control including DWARF and symbol table for images/binaries Signed-off-by: Sunnatillo <[email protected]>
e8d6c73 to
4fbbc69
Compare
| add_ldflag "gitVersion" "${GIT_VERSION}" | ||
| add_ldflag "gitReleaseCommit" "${GIT_RELEASE_COMMIT}" | ||
|
|
||
| # The -ldflags parameter takes a single string, so join the output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check if that breaks using Tilt with the debugger. Probably not, but not entirely sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ldflags set in separate place for Tilt. it does not affect the tilt debugging.
Line 224 in 490f76e
| build_cmd = "{build_env} go build {build_options} -gcflags '{gcflags}' -ldflags '{ldflags}' -o .tiltbuild/bin/{binary_name} {go_main}".format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tested and working fine.
|
/area misc |
|
Thx for the PR. I want to do some due diligence before merging it. Just probably won't find time to do it any time soon |
What this PR does / why we need it:
This PR removes DWARF and symbol table from binaries by default and introduces an option including them by setting
DBG=1.Current images
After removing DWARF and symbol table
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
#12855