From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f201.google.com (mail-dy1-f201.google.com [74.125.82.201]) (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 3A660377016 for ; Mon, 30 Mar 2026 17:19:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774891166; cv=none; b=qdavWqbWJ8gus6f6L/hy17iSg2KK+fBtaSCU/Atyy5pHf9SkRBbzWnXg/CsyiDrnhCBA29Z03JYdjNrDFV01nlmsE0jYX5/99fhRyORX+WrM2hUAz54jK9BGrlruDIFn8zUfL39YCYwbslBBsrfcu7FvTr2WPtiqPZuSjVgesrY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774891166; c=relaxed/simple; bh=5ck/FR28yMeqziHcX6QP2KCqS3TT49rCLIznZg7DIaQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=B/pAWDUMYnJweVzx1zqV7BxZqeFOsl0vu9yo2zgtKo/edzwPsCDhyx4y3kWqheHY2R2MspO74l6EKZg5YLJ+RU1MAOzRuu4q2HCv/NsQf/xiiXFOA8gbREcthqc6I+/mzTyjXBHJtLTU6SoUKpAJn0OvBW0xyqJHABFz8k50IOI= 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=wPC4uOjI; arc=none smtp.client-ip=74.125.82.201 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="wPC4uOjI" Received: by mail-dy1-f201.google.com with SMTP id 5a478bee46e88-2ba9a744f7dso4874073eec.0 for ; Mon, 30 Mar 2026 10:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1774891164; x=1775495964; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=G05DSpbW2+WuvU/zQwgPs9wiMjlPCBEOvZkM0+puVoU=; b=wPC4uOjI33zPccxAiRR2ruVLEyqD7dtKzidNJ3UBUmGvQhTIWUVlwS/nq3tgQo4sSF rIMfcnmkSkI+WdR2qGvmQTONFMCfm38qzWwegwcWA7w/Z0ieeWOT7RSRoiQJdLLXtTMU +2dAN03TPAnadYv4kPjPw0PwoZqhWY+E1zQlNYY18c5GB6SGajQrF4yXzWS+E0Lc24hW /ALfvWYIn78MASPkfnFhxgFOjUmGXu2dSmH7JgpdLP2ZwW2alfQYMcUp9DZWH5LBAM0P klqmaJWtbj9CQy5B3VhKBdEhVKjD67zgN0k2aG5LMfyZTeBGR+YVupRgQBi2L/LS6q/+ zK3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774891164; x=1775495964; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=G05DSpbW2+WuvU/zQwgPs9wiMjlPCBEOvZkM0+puVoU=; b=b3rURJiLzRKGz46Nm5sZHlwU2Zp3OYPDZBw6ONJIwhJc3uVGHJT2Bk0lrQ85jdJaLa 87tdG6ArJyHK5Sqsnd6kQVKr6mAdROnEZ1fLktDvgcaeouEXeL06c1qdu4eQGm4+df5G 5TbeqfejuRq9A2QKRThLUFzUkbJnjttIn92mUnVZS1DffEitAUupm8epowblYR5RKEmb QW2JfkHZ4kKNHlLaLtQ3ZUF7lpu8okalw3ix7IZM1asT0TX16w0qS0CcPlJMmUmktBQS TgHUMALgO3W5V5N/0OeOuYWOMI7Nu/QxQ/Wwj8p0MOsWm2Nc/MOAxjMP/79tnQLouy2K /TyQ== X-Gm-Message-State: AOJu0YzCcJ4K9Y3mzDOjW/ZbF0Uj2ZE4ceqdouxjl0OB8+USCrbDnPCs eaBuKpkBuA8eriI2SsAuPeY+/QmBhJQE5+NlHDqcT9webgusL+PK5jXT57wZgfPzBZQJgw== X-Received: from dybmt4.prod.google.com ([2002:a05:7300:d584:b0:2c0:b626:c453]) (user=xur job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7300:d512:b0:2b7:2664:ae9f with SMTP id 5a478bee46e88-2c185cdd05fmr7275474eec.1.1774891163845; Mon, 30 Mar 2026 10:19:23 -0700 (PDT) Date: Mon, 30 Mar 2026 17:19:16 +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: <20260330171920.2026779-1-xur@google.com> Subject: [PATCH v8 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: 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