Re: [PATCH v5 0/2] kbuild: distributed build support for Clang ThinLTO
From: Nathan Chancellor
Date: Thu Mar 12 2026 - 04:26:00 EST
Hi Nicolas,
On Tue, Oct 28, 2025 at 06:28:20PM +0000, xur@xxxxxxxxxx wrote:
> From: Rong Xu <xur@xxxxxxxxxx>
>
> ChangeLog:
>
> V5: Handle single quote escaping in echo _c_flags to fix
> Piotr Gorski's reported error.
>
> V4: This is based on the reimplementation provided by Masahiro Yamada
> on May 26. The difference is that this version now saves the compiler
> flags (_c_flags) from the Front-End (FE) compilation and re-uses them
> for the subsequent Back-End (BE) compilation.
>
> Rong Xu (2):
> kbuild: move vmlinux.a build rule to scripts/Makefile.vmlinux_a
> kbuild: distributed build support for Clang ThinLTO
>
> .gitignore | 2 +
> Makefile | 25 +++++-------
> arch/Kconfig | 19 +++++++++
> scripts/Makefile.lib | 7 ++++
> scripts/Makefile.thinlto | 40 ++++++++++++++++++
> scripts/Makefile.vmlinux_a | 83 ++++++++++++++++++++++++++++++++++++++
> scripts/mod/modpost.c | 15 +++++--
> 7 files changed, 174 insertions(+), 17 deletions(-)
> create mode 100644 scripts/Makefile.thinlto
> create mode 100644 scripts/Makefile.vmlinux_a
I have been running this for a few months locally and I have not noticed
any problems with it (at least for the two distribution configurations I
regularly test). I think this looks good overall and seems fairly well
contained thanks to Masahiro's work on the earlier revisions. Could this
be picked up in kbuild-next-unstable so it can bake in -next for a
little bit? It should still be applicable.
Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Tested-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Cheers,
Nathan