netbird: strip debug symbols to reduce size#28638
netbird: strip debug symbols to reduce size#28638ShayBox wants to merge 1 commit intoopenwrt:masterfrom
Conversation
Signed-off-by: ShayBox <shaybox@shaybox.com>
|
I don't think you need to add those manually: packages/lang/golang/golang-version.mk Lines 232 to 244 in 6c11904 |
|
NetBird is huge indeed so any shrinking can be helpful |
|
|
||
| GO_PKG:=github.com/netbirdio/netbird | ||
| GO_PKG_BUILD_PKG:=$(GO_PKG)/client | ||
| GO_PKG_LDFLAGS:=-s -w |
There was a problem hiding this comment.
This is roughly the same as stripping.
| GO_PKG_BUILD_PKG:=$(GO_PKG)/client | ||
| GO_PKG_LDFLAGS:=-s -w | ||
| GO_PKG_LDFLAGS_X:=$(GO_PKG)/version.version=$(PKG_VERSION) | ||
| GO_PARAMS_EXTRA:=-trimpath |
There was a problem hiding this comment.
This is set already in the default vars. Is this package not using them?
| $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) | ||
| $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d | ||
| $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/client $(1)/usr/bin/netbird | ||
| strip --strip-all $(1)/usr/bin/netbird |
There was a problem hiding this comment.
The toolchain already strips binaries by default. Is this somehow not the case for Netbird?
|
Like @GeorgeSapkin and @LGA1150 mentioned, this option is already the default and @ShayBox, can you build a package and an image with and without your patch and show the difference? |
📦 Package Details
Maintainer: @wehagy
Description: Changes the build flags to strip debug symbols, to reduce the binary size so that the package can be installed on consumer routers with limited flash storage.
🧪 Run Testing Details
✅ Formalities