[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:12:03 PDT 2025


================
@@ -0,0 +1,32 @@
+add_compile_definitions("MLIR_PYTHON_PACKAGE_PREFIX=${MLIR_PYTHON_PACKAGE_PREFIX}.")
+
+declare_mlir_python_sources(StandReallyAlonePythonSources)
+declare_mlir_dialect_python_bindings(
+  ADD_TO_PARENT StandReallyAlonePythonSources
+  ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir_standreallyalone"
+  SOURCES
+    dialects/standalonereallyalone.py
+    dialects/_ods_common.py
+)
+
+declare_mlir_python_extension(StandReallyAlonePythonSources.NanobindExtension
+  MODULE_NAME _standReallyAloneDialectsNanobind
+  ADD_TO_PARENT StandReallyAlonePythonSources
+  SOURCES
+    StandReallyAloneExtensionNanobind.cpp
+  PRIVATE_LINK_LIBS
+    StandaloneCAPI
----------------
makslevental wrote:

We need to fully link `StandaloneCAPI` instead of `EMBED_CAPI_LINK_LIBS` because we're not building the aggregate.

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


More information about the Mlir-commits mailing list