Skip to content

Commit a555bdd

Browse files
committed
Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding
In commit 5cf0fd5 ("Kbuild: disable TRIM_UNUSED_KSYMS option") I disabled this option because it's hugely expensive at build time, and I questioned how much use it gets. Several people piped up and convinced me it's actually useful, so instead of disabling it entirely, it now depends on EXPERT and gets disabled by COMPILE_TEST builds so that 'allmodconfig' style things don't enable it. I still hope somebody will take a look at the build time issue, because as Arnd also noted: "However, the combination of thinlto and trim indeed has a steep cost in compile time, taking almost twice as long as a normal defconfig (gc-sections makes it slightly faster)" Cc: Masahiro Yamada <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Jessica Yu <[email protected]> Cc: Cristoph Hellwig <[email protected]>, Cc: Miroslav Benes <[email protected]> Cc: Emil Velikov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c03c21b commit a555bdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

init/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,8 +2273,8 @@ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
22732273
If unsure, say N.
22742274

22752275
config TRIM_UNUSED_KSYMS
2276-
bool "Trim unused exported kernel symbols"
2277-
depends on BROKEN
2276+
bool "Trim unused exported kernel symbols" if EXPERT
2277+
depends on !COMPILE_TEST
22782278
help
22792279
The kernel and some modules make many symbols available for
22802280
other modules to use via EXPORT_SYMBOL() and variants. Depending

0 commit comments

Comments
 (0)