build: add a config knob to enable LTO for all packages

This enables LTO for all packages which haven't opted-out.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider
2023-01-28 15:24:37 +01:00
committed by Christian Marangi
parent 1342afcd27
commit 9ea7019ffd
2 changed files with 8 additions and 1 deletions

View File

@@ -152,6 +152,13 @@ menu "Global build settings"
garbage collection capabilites.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-gc-sections
config USE_LTO
bool
prompt "Use the link-time optimizer for all packages (EXPERIMENTAL)"
help
Adds LTO flags to the CFLAGS and LDFLAGS.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto
config IPV6
def_bool y