build: add a config knob to enable LTO for all packages
[openwrt/openwrt.git] / config / Config-build.in
index f93ad37586c5a4c0339fe4e43159344d594f6e23..df2d9101ca99c91fc8cf727f81bd636f67994fa1 100644 (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