[Mlir-commits] [mlir] [mlir][Python] don't build libnanobind if module only has "pure" extensions (PR #175090)

Rahul Kayaith llvmlistbot at llvm.org
Mon Jan 12 07:34:14 PST 2026


================
@@ -393,13 +393,28 @@ function(add_mlir_python_modules name)
     set(ARG_MLIR_BINDINGS_PYTHON_NB_DOMAIN "mlir")
   endif()
 
+  # Collect up all the transitive extension targets.
+  _flatten_mlir_python_targets(_flat_targets ${ARG_DECLARED_SOURCES})
+
+  # Modules with only pure extensions shouldn't build libnanobind.
----------------
rkayaith wrote:

nit
```suggestion
  # Modules with only pure python extensions shouldn't build libnanobind.
```

https://github.com/llvm/llvm-project/pull/175090


More information about the Mlir-commits mailing list