]> git.baikalelectronics.ru Git - kernel.git/commit
Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 16:57:06 +0000 (08:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 16:57:06 +0000 (08:57 -0800)
commit1a8c3ff38742d28ba4bec16a0f6502ccf8e55614
tree964dd7826bcd23078c1d7829ed9548ae7db7024b
parent039af8ef3fa6652d3ac6d92a2ba7a5d5926d8643
Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding

In commit 514440aa1d29 ("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 <masahiroy@kernel.org>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Cristoph Hellwig <hch@lst.de>,
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/Kconfig