Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-21 Thread Kees Cook
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

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-20 Thread Sami Tolvanen
On Fri, Nov 20, 2020 at 3:59 PM Kees Cook wrote: > > On Fri, Nov 20, 2020 at 12:58:41PM -0800, Sami Tolvanen wrote: > > On Fri, Nov 20, 2020 at 12:43 PM Kees Cook wrote: > > > > > > On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote: > > > > On Fri, Nov 20, 2020 at 11:47:21AM

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 12:58:41PM -0800, Sami Tolvanen wrote: > On Fri, Nov 20, 2020 at 12:43 PM Kees Cook wrote: > > > > On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote: > > > On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > > > > On Fri, Nov 20, 2020 at 08:23:11AM

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-20 Thread Sami Tolvanen
On Fri, Nov 20, 2020 at 12:43 PM Kees Cook wrote: > > On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote: > > On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > > > On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > > > > Changing the ThinLTO config to a

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote: > On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > > On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > > > Changing the ThinLTO config to a choice and moving it after the main > > > LTO config sounds like

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-20 Thread Nathan Chancellor
On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > > Changing the ThinLTO config to a choice and moving it after the main > > LTO config sounds like a good idea to me. I'll see if I can change > > this in v8. Thanks! > >

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > Changing the ThinLTO config to a choice and moving it after the main > LTO config sounds like a good idea to me. I'll see if I can change > this in v8. Thanks! Originally, I thought this might be a bit ugly once GCC LTO is added,

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-20 Thread Sami Tolvanen
On Wed, Nov 18, 2020 at 3:49 PM Nick Desaulniers wrote: > > On Wed, Nov 18, 2020 at 2:07 PM Sami Tolvanen wrote: > > > > This change adds build system support for Clang's Link Time > > Optimization (LTO). With -flto, instead of ELF object files, Clang > > produces LLVM bitcode, which is compiled

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-18 Thread Nick Desaulniers
On Wed, Nov 18, 2020 at 2:07 PM Sami Tolvanen wrote: > > This change adds build system support for Clang's Link Time > Optimization (LTO). With -flto, instead of ELF object files, Clang > produces LLVM bitcode, which is compiled into native code at link > time, allowing the final binary to be

[PATCH v7 02/17] kbuild: add support for Clang LTO

2020-11-18 Thread Sami Tolvanen
This change adds build system support for Clang's Link Time Optimization (LTO). With -flto, instead of ELF object files, Clang produces LLVM bitcode, which is compiled into native code at link time, allowing the final binary to be optimized globally. For more details, see: