|
Message-ID: <202011211204.211E2B12@keescook> Date: Sat, 21 Nov 2020 12:11:25 -0800 From: Kees Cook <keescook@...omium.org> To: Sami Tolvanen <samitolvanen@...gle.com> Cc: Nathan Chancellor <natechancellor@...il.com>, Nick Desaulniers <ndesaulniers@...gle.com>, Masahiro Yamada <masahiroy@...nel.org>, Steven Rostedt <rostedt@...dmis.org>, Will Deacon <will@...nel.org>, Josh Poimboeuf <jpoimboe@...hat.com>, Peter Zijlstra <peterz@...radead.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Paul E. McKenney" <paulmck@...nel.org>, clang-built-linux <clang-built-linux@...glegroups.com>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, linux-arch <linux-arch@...r.kernel.org>, Linux ARM <linux-arm-kernel@...ts.infradead.org>, Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, linux-pci@...r.kernel.org Subject: Re: [PATCH v7 02/17] kbuild: add support for Clang LTO On Fri, Nov 20, 2020 at 05:46:44PM -0800, Sami Tolvanen wrote: > Sure, this looks good to me, I'll use this in v8. The only minor > concern I have is that ThinLTO cannot be set as the default LTO mode, > but I assume anyone who selects LTO is also capable of deciding which > mode is better for them. It could be re-arranged similar to what you had before, but like: config LTO bool "..." depends on HAS_LTO help ... choice prompt "LTO mode" if LTO default LTO_GCC if HAS_LTO_GCC default LTO_CLANG_THIN if HAS_LTO_CLANG default LTO_CLANG_FULL help ... config LTO_CLANG_THIN ... config LTO_CLANG_FULL endchoice Then the LTO is top-level yes/no, but depends on detected capabilities, and the mode is visible if LTO is chosen, etc. I'm not really sure which is better... > > +config LTO_CLANG_THIN > > + bool "Clang ThinLTO (EXPERIMENTAL)" > > + depends on ARCH_SUPPORTS_LTO_CLANG_THIN > > + select LTO_CLANG > > + help > > + This option enables Clang's ThinLTO, which allows for parallel > > + optimization and faster incremental compiles compared to the > > + CONFIG_LTO_CLANG_FULL option. More information can be found > > + from Clang's documentation: > > + > > + https://clang.llvm.org/docs/ThinLTO.html > > + > > + If unsure, say Y. > > endchoice > > The two LTO_CLANG_* options need to depend on HAS_LTO_CLANG, of course. Whoops, yes. Thanks for catching that. :) -- Kees Cook
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.