[Mlir-commits] [mlir] [MLIR][Python][NOMERGE] demo building bindings with no CAPI aggregate and using mlir aggregate (PR #161782)

Maksim Levental llvmlistbot at llvm.org
Thu Oct 2 23:10:37 PDT 2025


================
@@ -0,0 +1,10 @@
+#  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+#  See https://llvm.org/LICENSE.txt for license information.
+#  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+from ._ods_common import _cext
+
+_cext.globals.append_dialect_search_prefix("mlir_standreallyalone.dialects")
----------------
makslevental wrote:

we need to set `-DMLIR_PYTHON_PACKAGE_PREFIX=mlir` so that `StandReallyAloneExtensionNanobind.cpp` compiles with the right [`#define`s](https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir-c/Bindings/Python/Interop.h#L50-L85) but that breaks [opview search](https://github.com/llvm/llvm-project/blob/a40f47c9725f3aed6752f050f3010f3701d0cff7/mlir/lib/Bindings/Python/IRModule.cpp#L47), so we fix it here.

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


More information about the Mlir-commits mailing list