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 538573290AF for ; Sat, 28 Mar 2026 01:19: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=1774660775; cv=none; b=DmLo5lFefF9BZcEy2+EDDF88Djpco8nlFQqBEdTbbDd5PZadPpruW5/apnGxk5ISwAyonvnpWQuM9RgnvRwQZ2icwvNBU8ra0JeyHkWds9f+ncjipnoJEbKqTnY6d8oE/UkWMMM2Fiy0Zl+lwlQOJ/KloytKlipQucP7xiDRzH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774660775; c=relaxed/simple; bh=HDqV0Py005zQIsbLeQfUi8Qe3O2XbyV3pJb2YvqFjZ8=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=lxrcEzW8Uqe4+nzMpsY+96ru2TPAnrrvNRK48YB/9GGh/0YaXK6YZzX0//sMbmE82H4MjMQ+x2GozsJbaeoBZjj4Hmuun930IWOyF8Gr1bghrMktpnqpRBS0gp+8JXKwyBs6XByDrAqOp/sn670xgWrJ4ij4VQAPFtowlL+GhXo= 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=o/8UFSyE; 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="o/8UFSyE" Received: by mail-dl1-f74.google.com with SMTP id a92af1059eb24-127876be621so1691390c88.1 for ; Fri, 27 Mar 2026 18:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1774660771; x=1775265571; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=9Y8qoX2i2pgK07/S9R6C/ITZShbzZ0BOZvH25QidFt8=; b=o/8UFSyEi3MgmsVaGIFkcKF9Xb624CDp/Bg3DWhpbSxRFxmA1Xwsir8GpZ9lNCci5z 1clkpPKFXUTNebADFcrWTfeULasQEzC+UtsEGvlrKuRIQ5HABTXKTCDeDrwsS1qR1S2o +TEXaPtqTguMwfpEk263IHGFDPChy6iPgk294MemmFYGSfa16U3kuARcn3cBwFjtEdCu uyz6Ha6YaQgvRuNivZ/Upcgqh2DNWonFGj5pZywm3YRZfW+Tkr9awymm8CPlx7p2V3MV 9o5+MUKEcMw/0YQMuJcXbwNmmHoq55l+ZwlGHIJXTiatgXrAaKVzWYeFMh17RaF1iJC7 cT5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774660771; x=1775265571; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9Y8qoX2i2pgK07/S9R6C/ITZShbzZ0BOZvH25QidFt8=; b=gms4DjrSVsUX0PDQhkRArOytb7Vt+OBAqTFvVDvbt0ArWbS4YOzM3og92U2Q4vhjF4 m9pfsF6qWNRq6YRHuxbAPqzOqP/1mh6fX8KUB0RHaYNM0b3lzl6zG4lelkYWofHH2AP4 hKvyFPeakNafNe1ow5IByiBv44tdeJGGTJRQXLBZ/ZUR5gZY/cEL0OdSqwK2eH5RMHo4 nB6zKhQwX23Zh3t5wnxbZ3DZQBgbJthj6PU9Z4Yk0g0/rAV0fv5Ev9uzH0wuN5N14Q5Y DHT9LhtdbwNzDQNYMhBub7fk4HhTGURfxcAX2KQJqSOo1+Gz1essG8eg/fd00nAewqmZ ivdA== X-Gm-Message-State: AOJu0YxMIjTo/U4wYItAq7xpQE10RjPybTb9blsaWStn4E+EDgfStJWP Bi6oIrodcblcaS/qwH3nsKWIHeh5E9jeop1IxWOYFqJOXvUGy8BwVWQnxET3gBiygZ8NkA== X-Received: from dlbsj11.prod.google.com ([2002:a05:7022:f90b:b0:128:dfaf:10ac]) (user=xur job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:670d:b0:128:cdb7:76e1 with SMTP id a92af1059eb24-12ab3029ebfmr1892234c88.13.1774660770853; Fri, 27 Mar 2026 18:19:30 -0700 (PDT) Date: Sat, 28 Mar 2026 01:19: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: <20260328011927.3569802-1-xur@google.com> Subject: [PATCH v7 0/3] kbuild: distributed build support for Clang ThinLTO From: xur@google.com To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Nick Desaulniers , 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: 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 | 25 +++++------- arch/Kconfig | 19 +++++++++ scripts/Makefile.lib | 7 ++++ scripts/Makefile.thinlto | 40 ++++++++++++++++++ scripts/Makefile.vmlinux_a | 83 ++++++++++++++++++++++++++++++++++++++ scripts/mod/modpost.c | 15 +++++-- 7 files changed, 174 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