From: Nathan Chancellor <nathan@kernel.org>
To: Rong Xu <xur@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Nicolas Schier <nicolas.schier@linux.dev>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Yonghong Song <yonghong.song@linux.dev>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Miguel Ojeda <ojeda@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Alice Ryhl <aliceryhl@google.com>,
Sami Tolvanen <samitolvanen@google.com>,
"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
Rafael Aquini <aquini@redhat.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Stafford Horne <shorne@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Piotr Gorski <piotrgorski@cachyos.org>,
Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Teresa Johnson <tejohnson@google.com>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH v10 3/3] kbuild: distributed build support for Clang ThinLTO
Date: Thu, 28 May 2026 13:40:29 -0700 [thread overview]
Message-ID: <20260528204029.GC3100532@ax162> (raw)
In-Reply-To: <CAF1bQ=Syrnb-wEfXmHpcDg3u7JVXQnDExhjWFzDAzA3paZD7mQ@mail.gmail.com>
On Thu, May 28, 2026 at 12:04:59PM -0700, Rong Xu wrote:
> On Wed, May 27, 2026 at 5:54 PM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > On Tue, 26 May 2026 10:29:26 -0700, xur@google.com <xur@google.com> wrote:
> > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> > > index 0718e39cedda..b36c7c6817bd 100644
> > > --- a/scripts/Makefile.lib
> > > +++ b/scripts/Makefile.lib
> > > @@ -249,6 +249,12 @@ ifdef CONFIG_LTO_CLANG
> > > cmd_ld_single = $(if $(objtool-enabled)$(is-single-obj-m), ; $(LD) $(ld_flags) -r -o $(tmp-target) $@; mv $(tmp-target) $@)
> > > endif
> > >
> > > +ifdef CONFIG_LTO_CLANG_THIN_DIST
> > > +# Save the _c_flags, sliently.
> > > +quiet_cmd_save_c_flags =
> > > + cmd_save_c_flags = printf '\n%s\n' 'saved_c_flags_$@ := $(call escsq,$(_c_flags))' >> $(dot-target).cmd
> >
> > Sashiko notes that we might want modkern_cflags here as well, which
> > seems like it could really matter for LoongArch?
> >
> > https://sashiko.dev/#/patchset/25040?part=3
> >
> This is a valid point, as users have the ability to add new flags via
> KBUILD_KERNL_FLAGS and they are likely needed to pass the backend. I
> will update saved_c_flags to include modkern_cflags.
>
> > The other comments might be relevant too but I did not look too closely
> > as I am wrapping up my day but I wanted to bring this to your attention
> > sooner rather than later.
>
> The second comment concerns using a shell script to get _c_flags: I
> opted for this method instead of $(saved_c_flags_$(<) to avoid loading
> $(<).cmd in the Makefile. Note that I only load $(@).cmd at the end of
> the file. However, if we would rather use the latter approach, I can
> make that change, though it will require loading $(<).cmd file.
Yeah, I think it is fine to leave it this way for now. If someone can
prove it matters for a significant amount of performance, we can
revisit.
> The third comment concerns file name matching: That is a fair point; I
> should have implemented a more precise matching criteria. I will
> address and fix this.
>
> I disagree with some of the comments regarding compile times. We have
> tested this build mode extensively and observed no compile-time
> regressions compared to the existing in-process ThinLTO build.
Yeah, I tend to agree that the performance concerns are overblown.
> I will send the updated patch shortly, after I tested the changes.
Thanks!
--
Cheers,
Nathan
prev parent reply other threads:[~2026-05-28 20:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 17:29 [PATCH v10 0/3] kbuild: distributed build support for Clang ThinLTO xur
2026-05-26 17:29 ` [PATCH v10 1/3] kbuild: move vmlinux.a build rule to scripts/Makefile.vmlinux_a xur
2026-05-26 17:29 ` [PATCH v10 2/3] kbuild: change --thin back to 'T' in $(AR) xur
2026-05-26 17:29 ` [PATCH v10 3/3] kbuild: distributed build support for Clang ThinLTO xur
2026-05-28 0:53 ` Nathan Chancellor
2026-05-28 19:04 ` Rong Xu
2026-05-28 20:40 ` Nathan Chancellor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260528204029.GC3100532@ax162 \
--to=nathan@kernel.org \
--cc=aliceryhl@google.com \
--cc=aquini@redhat.com \
--cc=christophe.leroy@csgroup.eu \
--cc=justinstitt@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=morbo@google.com \
--cc=mpe@ellerman.id.au \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=nicolas.schier@linux.dev \
--cc=ojeda@kernel.org \
--cc=piotrgorski@cachyos.org \
--cc=rppt@kernel.org \
--cc=samitolvanen@google.com \
--cc=shorne@gmail.com \
--cc=tejohnson@google.com \
--cc=tglx@linutronix.de \
--cc=venkat88@linux.ibm.com \
--cc=xur@google.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox