Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmd] Add new make targets with ldflags to build lite version binaries (
#34698) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> We can use ldflags `-w` and `-s` to downscale the binary size. The official docs explanation of the two options: ``` -s Omit the symbol table and debug information. -w Omit the DWARF symbol table. ``` After building with the above options, the binary size scales down 28%: ``` -rwxr-xr-x 1 fraps staff 249M Aug 15 14:23 otelcontribcol_darwin_arm64 -rwxr-xr-x 1 fraps staff 347M Aug 8 18:20 otelcontribcol_darwin_arm64-old ``` I think it's worth adding them. The only degradation is we can't use GDB to debug however it rare use case. **Link to tracking Issue:** <Issue number if applicable> **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.> --------- Co-authored-by: Curtis Robert <[email protected]>
- Loading branch information