[llvm] Reland "[bazel][mlir][python] Port #155741: stub auto-generation" (PR #159940)

Alex Trotta via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 20 12:06:51 PDT 2025


https://github.com/Ahajha created https://github.com/llvm/llvm-project/pull/159940

Relands https://github.com/llvm/llvm-project/pull/157173 (reverts llvm/llvm-project#157995).

The stubgen was relanded here: https://github.com/llvm/llvm-project/pull/157930

>From bfa5395a8a9e1fbf9659a4005eee82f0cffa62b8 Mon Sep 17 00:00:00 2001
From: Alex Trotta <44127594+Ahajha at users.noreply.github.com>
Date: Sat, 20 Sep 2025 15:04:45 -0400
Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"[bazel][mlir][python]=20Por?=
 =?UTF-8?q?t=20#155741:=20stub=20auto-generation=20(#15=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit ed1f1b88e49b244658aebc8a48dc8cd458363e70.
---
 utils/bazel/WORKSPACE                         |  6 ++--
 .../mlir/python/BUILD.bazel                   | 36 -------------------
 2 files changed, 3 insertions(+), 39 deletions(-)

diff --git a/utils/bazel/WORKSPACE b/utils/bazel/WORKSPACE
index 00cfea572096a..cb6dfa3a01cfa 100644
--- a/utils/bazel/WORKSPACE
+++ b/utils/bazel/WORKSPACE
@@ -186,9 +186,9 @@ maybe(
     http_archive,
     name = "nanobind",
     build_file = "@llvm-raw//utils/bazel/third_party_build:nanobind.BUILD",
-    sha256 = "bb35deaed7efac5029ed1e33880a415638352f757d49207a8e6013fefb6c49a7",
-    strip_prefix = "nanobind-2.4.0",
-    url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.4.0.tar.gz",
+    sha256 = "8ce3667dce3e64fc06bfb9b778b6f48731482362fb89a43da156632266cd5a90",
+    strip_prefix = "nanobind-2.9.2",
+    url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.9.2.tar.gz",
 )
 
 load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
diff --git a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
index a6e8c515f0874..ac92e05a10160 100644
--- a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
@@ -32,13 +32,6 @@ filegroup(
     ],
 )
 
-filegroup(
-    name = "ExecutionEnginePyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlirExecutionEngine.pyi",
-    ],
-)
-
 filegroup(
     name = "IRPyFiles",
     srcs = [
@@ -53,14 +46,6 @@ filegroup(
     ]),
 )
 
-filegroup(
-    name = "IRPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/__init__.pyi",
-        "mlir/_mlir_libs/_mlir/ir.pyi",
-    ],
-)
-
 filegroup(
     name = "MlirLibsPyFiles",
     srcs = [
@@ -75,13 +60,6 @@ filegroup(
     ],
 )
 
-filegroup(
-    name = "PassManagerPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/passmanager.pyi",
-    ],
-)
-
 filegroup(
     name = "RewritePyFiles",
     srcs = [
@@ -691,13 +669,6 @@ gentbl_filegroup(
     ],
 )
 
-filegroup(
-    name = "PDLPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/dialects/pdl.pyi",
-    ],
-)
-
 filegroup(
     name = "PDLPyFiles",
     srcs = [
@@ -788,13 +759,6 @@ filegroup(
 # Quant dialect.
 ##---------------------------------------------------------------------------##
 
-filegroup(
-    name = "QuantPyIFiles",
-    srcs = [
-        "mlir/_mlir_libs/_mlir/dialects/quant.pyi",
-    ],
-)
-
 filegroup(
     name = "QuantPyFiles",
     srcs = [



More information about the llvm-commits mailing list