From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f202.google.com (mail-dy1-f202.google.com [74.125.82.202]) (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 A467B3FADF8 for ; Tue, 26 May 2026 17:29:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779816572; cv=none; b=AnYYLmX5sqYvIKmtwJjMOiRpj/xhkB/58KC3OEcQT512TfuUsMAs1pTSsfj0ba57HW8GgvVuouxjowq2RqBN1j2Sho5SxJ9/3Bjauacdcuo+0817DRdKI8NFU1I9sG1l/xT166mGtzoXk6F8V/uc6r8GXni+SmhbtD5GCpHVYpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779816572; c=relaxed/simple; bh=NM1hox/nmIStFDjJctyTRdY4mjSysbTeC8x06nBRPwY=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=thGLtiOvSNuaAUyV+yLqVMQHrSoZtKXaaA+1rZjPznszLqPmr4uDeBokbhhvsNEKPyAhkZl69ZvI1Ayd8CDpJfHEaoTNue42W6bdSg1Noi9UVTu94CJ4nvEOhpVAAYdP7gKA5GhXhaGRH3ioc/zhNfWiRQuKcXDkbGt9KZZCYDc= 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=oZi+L4Nd; arc=none smtp.client-ip=74.125.82.202 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="oZi+L4Nd" Received: by mail-dy1-f202.google.com with SMTP id 5a478bee46e88-2ef62078ee7so11822617eec.0 for ; Tue, 26 May 2026 10:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1779816571; x=1780421371; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=Qz4h094dWujd+s1IC1j9THDXhh+xEyMYGMcHMzAmczM=; b=oZi+L4Nd9OVQX4HUDprZO/Yiu50/Z71RX4oNO5JuLBPS6JnBs9M5eC6afkIP+vWF8i GxEI7VuM747dJ6je3vbiAolorTO7KxDUMgN7HD3VERnZmjJ4Z47o1PWfukIq0ac6wuxK D+gjcIeDkh+G0aYuS/2ATGlmN2Pj+Fdyhk4T/elRedl1yBapI2S+HUwatRPnDjQI9Vy7 59WOydoEOSt6UDgcDLdp8vTziQQ8xpmrZSDbOK7L3Seh0W/MK/6UGP1auyc10846YHGR eXxPrcWg3ZtJCHhimPvQf98eYJRAivN03RpiG3zgYy6b5DAL1trunJKHHPnh7Oj3o2E/ FO1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779816571; x=1780421371; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Qz4h094dWujd+s1IC1j9THDXhh+xEyMYGMcHMzAmczM=; b=AZG6tocVJlufWU7xjKvslIRA1iYlykUoHHfmyLIobBKDeL+CzVBlc9SA9CHf6rc1rs 63op8dQI3HM7kv4eaZ03a6svAi3rXSFFgDpR83/ArkBtw/sV4HtCkz6S+BgrvJ/eKBPG IuvnLzr2ELnOZzOeBNe+6lzlDHueg7ev66dGVwHC+AewRI9nA5HbE7ebldZF6V9ESYrv A7/EUIAMQyhnNhdF+pXD3LeJJ7NcLc1IYLTGcA2v4uyuvY2PY9NFEF2UD/y4/TvVUElO NsRQACBAqo6/gvX917hLcYQEy3DL2/ibcuuQ6SulouCYZUVmZPW+RfQjaUtDQNrRUKTr /RjA== X-Gm-Message-State: AOJu0YyDKqegw1jbDVZqN2SnytE6anzTlW2G6/6tZAf+SGjy7D+uyBud Dz6nmpJNE+0rcNUh1lpwRfHfeZI59yk474k/Ko//LJ5OG8nhZkimL6hAekL93s3UM60xBw== X-Received: from dlbpv3.prod.google.com ([2002:a05:7023:903:b0:132:8d92:4d6e]) (user=xur job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:69a7:b0:136:e639:9c05 with SMTP id a92af1059eb24-136e6399e34mr3410554c88.31.1779816570333; Tue, 26 May 2026 10:29:30 -0700 (PDT) Date: Tue, 26 May 2026 10:29:23 -0700 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.54.0.746.g67dd491aae-goog Message-ID: <20260526172926.2717929-1-xur@google.com> Subject: [PATCH v10 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: 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 | 7 ++++ scripts/Makefile.thinlto | 40 ++++++++++++++++++ scripts/Makefile.vmlinux_a | 83 ++++++++++++++++++++++++++++++++++++++ scripts/mod/modpost.c | 15 +++++-- 7 files changed, 179 insertions(+), 17 deletions(-) create mode 100644 scripts/Makefile.thinlto create mode 100644 scripts/Makefile.vmlinux_a base-commit: 2c31897a17e55a6da529b4e797e98c6febc60fd2 -- 2.54.0.746.g67dd491aae-goog