From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f74.google.com (mail-dl1-f74.google.com [74.125.82.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC6CC4218BE for ; Tue, 31 Mar 2026 15:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774972117; cv=none; b=ssH8rYMYoyImZxlRfNdSYvrBqjpxOQyrcBT/bgASrZg7qGcRaulNykjDcnumGkG5EEs2jayel4jLFxu+Smqcjh4KmJHjocylP04D/ZaD5y4aLYd5BmwTj7JzShy1KqdvUs9nhrDDLXM9Lspr+mXWKXYinz6NhW2nuByI19lVxEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774972117; c=relaxed/simple; bh=UpKPz3IcNnfUkaxE5x6u5xnlGmGCoHd3YYjcBNDqq2g=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=mxLiBrH673WjvrmzDQ1tEJknrzuDOqpHwa6jET6c9I1GMcMntd+d7VFBReDu/8WPztHyNowoZJ8NeQJnPIMH45Oc7Gh6vFQ0odDR2bEgzfhPfbwTv/Be+tX/X2TSb0d4+rU0kEgbnp9wH0R0ZLrLksjVHcN77FZNHugiB/Ia1Cw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--xur.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AGSPNlfD; arc=none smtp.client-ip=74.125.82.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--xur.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AGSPNlfD" Received: by mail-dl1-f74.google.com with SMTP id a92af1059eb24-12721cd1a2aso6922415c88.1 for ; Tue, 31 Mar 2026 08:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1774972111; x=1775576911; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=zrYcoA4JUlYO01gPXAFDA8Ve6v7akx2/ICM68YRF2tQ=; b=AGSPNlfDDszyjhVH0yqUdvcFoP5iZMhIfIF9MHj7kUBHf6iks3VgNpIU/P7xBBKNAd 2SAJG/sEtARgn0pJ49Daz7YVuoRkkEBZ/dPVp95cR/zz9yOJ6IuBwHY85tY71dZ5N0MO k2CDe1LqYuNMVi6aCC8OtolbQJkrzVwMqGSUwA9O+6Z+HDQud650VkQx7ZdFncBi8ksm DfB8xwyc8yHb34tLvF3eDPjQICiOmiF7bMKARFSlQJNJgbPlLl/IGc3ZeNq9AMHlujRM uIoiVY6PC2i5RHkW0z3UStRcwOFl33MaVTN5rIx5hpJz39GVoVnudnKJG8e7nHkvdCDr kmjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774972111; x=1775576911; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zrYcoA4JUlYO01gPXAFDA8Ve6v7akx2/ICM68YRF2tQ=; b=gEShFxSr5fb25CcxC9P2Ha8E2kmHlf0og7ElmyuZ2KAf0FRR0VZQJSUvSpWeyK7pGK 39I5kpSx/T1go9cj1ON8v6Rmb/WJ0M5IQbYdRqWlUbuZnjKGfkUt1cMON7u+a61DTg33 IfwHAOOG+ZRqGyP6u5gxOZzTUCoOF1xTpykcKGJJDIHXEkBT572oJzV/EFz99H2M4nQm LG1860vzaAtPjLc4RcKg3dlulOtfKuvHVTnA4s8cX5SJ8vkw9Evinr/9p/ucrswZmjv+ suy8gVY8yJltwVSR1vqATWUb8sCzYvhd9CGm4m8TKqRWlGHj5cOEOcTBhFMrwlh1BI6V kpWA== X-Gm-Message-State: AOJu0Yy4vxveeN+8wmqthDRqm6PrA/Fu1gXifhyrIK6SR0E0jezGW9i3 FgA6sxe58GVSj05B22LOHrGKiAcLJ4uYQF/LzCF37UKM8q/D0oGeNlizzEK0kQ3KlhFcFQ== X-Received: from dlbqj17.prod.google.com ([2002:a05:7022:ec11:b0:12a:7349:f4f6]) (user=xur job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:2608:b0:12a:796b:7cf1 with SMTP id a92af1059eb24-12ab28d8cb9mr11052469c88.23.1774972110850; Tue, 31 Mar 2026 08:48:30 -0700 (PDT) Date: Tue, 31 Mar 2026 15:48:24 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.53.0.1018.g2bb0e51243-goog Message-ID: <20260331154827.2793269-1-xur@google.com> Subject: [PATCH v9 0/3] kbuild: distributed build support for Clang ThinLTO From: xur@google.com To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Nick Desaulniers , Yonghong Song , Bill Wendling , Justin Stitt , Miguel Ojeda , Thomas Gleixner , Alice Ryhl , Sami Tolvanen , "Mike Rapoport (Microsoft)" , Rafael Aquini , Michael Ellerman , Stafford Horne , Christophe Leroy , Piotr Gorski , Rong Xu , Venkat Rao Bagalkote , Miguel Ojeda , Teresa Johnson Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" From: Rong Xu ChangeLog: V9: Fix 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 | 27 ++++++------- arch/Kconfig | 19 +++++++++ scripts/Makefile.lib | 7 ++++ scripts/Makefile.thinlto | 40 ++++++++++++++++++ scripts/Makefile.vmlinux_a | 83 ++++++++++++++++++++++++++++++++++++++ scripts/mod/modpost.c | 15 +++++-- 7 files changed, 176 insertions(+), 17 deletions(-) create mode 100644 scripts/Makefile.thinlto create mode 100644 scripts/Makefile.vmlinux_a base-commit: dcc99abebfa1e9ca70f8af8695b6682ad7597bf2 -- 2.53.0.1018.g2bb0e51243-goog