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 42814383C60 for ; Mon, 30 Mar 2026 17:19:25 +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=1774891167; cv=none; b=EUXxCNvIGUNOtKkY1mzP18VCIpn8mu0mP16mRUg7+nFkkVxYcu3/iwKOPh59FkkrutVgdN2PMWrSyWNouQJgKXNRpgy3bWbjYOVVkgO1CPsLpZhaorsPrj11TD+R5ke2j/Xue14WejHHfMn5KOUUf0KU8PrzfawYcYQSEkGfNpg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774891167; c=relaxed/simple; bh=5ck/FR28yMeqziHcX6QP2KCqS3TT49rCLIznZg7DIaQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=NINDhpCcyVrvJipY27B8PeEJtc6xWb86ETVpFWVGcOs9jZfLmupp+kcfMAvEYJOaFNmxVK0K07D0YJvOp3tayqMT3e0uY8B9PttncUH9/JCPXFEu/RCrNU27fpuFmr4jxSQ3Bk0+3HI/y5zGAlXNFu5wMK8Rpoc+qXB2vblxy5c= 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=hX+HiVFh; 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="hX+HiVFh" Received: by mail-dy1-f202.google.com with SMTP id 5a478bee46e88-2c16233ee11so4764619eec.1 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=lists.linux.dev; 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=hX+HiVFhI3NAr1oyD9p9L6R/HuSdEg7+ToD+bOEwoXdaAH+qgL5/fq2Z4Cq6ku48F5 L+ECBg9BEiSFMdB7s2iCqc5gDDOzTfQOkH/0d0VEhNj4EadVhWjlNeVu+x2cvVGvXtvl n7DCY5XU7XCvoOOurydFbzAMhTns2jNOlpSs7kmL4rtFqp+YNK1is9wgmHYW/BdyNBie UNvDXMn+m2gN/KT5+yzZf56+tr2sGDyg6ebZfeb8gaBja9hHFyAFd71teBnvVq/prL3g bwgwjrd6aNWGO9/16LS2bJsVcaFiQYai8xdiD3GtYXpwyyOMkVfbiYfsDswvAATMA9ZQ dlgA== 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=ZHv5ty65bVcLMbmsMu3YDa2aa5VR3JVM9Dj9ikxeU+UZz8BAMWPHErD1gI60l9yDwF ldJvAba+a8EPk34Sdmk8brdvpcKzzaP3okYE+QTghnp3kLJEvuqywcrHLdg+F89AbKXU w6Sg5gHS4XKWnMcUb5q4iwJ1yOmxplQYqMS6K3Siywxc0LEY71nJXxh7LLABlKmPkLr7 Qju0tyx24F/rFGjW8hRoKbapaDfKUaQ1aY20EixqNxB63tIio89v0W9Wp0o0TlkAE1N7 vju5IG8ab8SlzCVgrfolKAk4L+hqliXuQOEw3jzMmW+XuYLeRwhIuh0s/pCPHldMVNb5 EdzQ== X-Forwarded-Encrypted: i=1; AJvYcCUVSyzN1/KGsf92yYtIqsLtT6uyjGJIqikFtxBkl8A1ORx421qGFMfThrXoGxKfLU+oHo0j@lists.linux.dev X-Gm-Message-State: AOJu0YxUOH902ZREanHbPxSCMsSB5sl70doOn4aG+m1t2iJCm5y0aL7X Ol6si3YdmWX41BpeEm6/WeZFt+mZp2q6N8VGPPHWo8bVUiSd4t2qzLY+Zf7geAtq5iEa+w== 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: llvm@lists.linux.dev 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