| From: |
| xur-AT-google.com |
| To: |
| Masahiro Yamada <masahiroy-AT-kernel.org>, Nathan Chancellor <nathan-AT-kernel.org>, Nicolas Schier <nicolas.schier-AT-linux.dev>, Nick Desaulniers <nick.desaulniers+lkml-AT-gmail.com>, Yonghong Song <yonghong.song-AT-linux.dev>, Bill Wendling <morbo-AT-google.com>, Justin Stitt <justinstitt-AT-google.com>, Miguel Ojeda <ojeda-AT-kernel.org>, Thomas Gleixner <tglx-AT-linutronix.de>, Alice Ryhl <aliceryhl-AT-google.com>, Sami Tolvanen <samitolvanen-AT-google.com>, "Mike Rapoport (Microsoft)" <rppt-AT-kernel.org>, Rafael Aquini <aquini-AT-redhat.com>, Michael Ellerman <mpe-AT-ellerman.id.au>, Stafford Horne <shorne-AT-gmail.com>, Christophe Leroy <christophe.leroy-AT-csgroup.eu>, Piotr Gorski <piotrgorski-AT-cachyos.org>, Rong Xu <xur-AT-google.com>, Venkat Rao Bagalkote <venkat88-AT-linux.ibm.com>, Miguel Ojeda <miguel.ojeda.sandonis-AT-gmail.com>, Teresa Johnson <tejohnson-AT-google.com> |
| Subject: |
| [PATCH v11 0/3] kbuild: distributed build support for Clang ThinLTO |
| Date: |
| Thu, 28 May 2026 13:39:02 -0700 |
| Message-ID: |
| <20260528203905.687687-1-xur@google.com> |
| Cc: |
| linux-kernel-AT-vger.kernel.org, linux-kbuild-AT-vger.kernel.org, llvm-AT-lists.linux.dev |
| Archive-link: |
| Article |
From: Rong Xu <xur@google.com>
ChangeLog:
V11: Integrated feedback from Sashiko (Nathan Chancellor):
(1) Included modkern_cflags within the saved _c_flags.
(2) Replaced the shell command with $(saved_c_flags_$(<)).
(3) Refined the file matching for ar_vmlinux.a.
V10: Fixed a minor build error in v9 and added comments.
V9: Fixed a minor build error.
V8: Disabled -always-rename-promoted-locals=false for the distrubute
mode, based on Yonghong and Nathan's comments.
V7: (1) Resolved a conflict by rebasing to kbuild/kbuild-next-unstable.
(2) Separated the '--thin' to 'T' change into its own patch to
preserve Masahiro's original version.
V6: Change '--thin' back to 'T' in Makefile.vmlinux_a to fix
reported the build error from old ar.
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 (3):
kbuild: move vmlinux.a build rule to scripts/Makefile.vmlinux_a
kbuild: change --thin back to 'T' in $(AR)
kbuild: distributed build support for Clang ThinLTO
.gitignore | 2 +
Makefile | 30 +++++++-------
arch/Kconfig | 19 +++++++++
scripts/Makefile.lib | 8 ++++
scripts/Makefile.thinlto | 41 +++++++++++++++++++
scripts/Makefile.vmlinux_a | 83 ++++++++++++++++++++++++++++++++++++++
scripts/mod/modpost.c | 15 +++++--
7 files changed, 181 insertions(+), 17 deletions(-)
create mode 100644 scripts/Makefile.thinlto
create mode 100644 scripts/Makefile.vmlinux_a
base-commit: 2c31897a17e55a6da529b4e797e98c6febc60fd2
--
2.54.0.823.g6e5bcc1fc9-goog