From a555bdd0c58ce368fb1324f0e93d17f7c4babece Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 24 Feb 2021 08:57:06 -0800 Subject: Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding In commit 5cf0fd591f2e ("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 Cc: Arnd Bergmann Cc: Jessica Yu Cc: Cristoph Hellwig , Cc: Miroslav Benes Cc: Emil Velikov Signed-off-by: Linus Torvalds --- init/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init') diff --git a/init/Kconfig b/init/Kconfig index ba8bd5256980..c2a18f56e944 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2273,8 +2273,8 @@ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS If unsure, say N. config TRIM_UNUSED_KSYMS - bool "Trim unused exported kernel symbols" - depends on BROKEN + bool "Trim unused exported kernel symbols" if EXPERT + depends on !COMPILE_TEST help The kernel and some modules make many symbols available for other modules to use via EXPORT_SYMBOL() and variants. Depending -- cgit v1.2.3-59-g8ed1b