[Mlir-commits] [mlir] [mlir][Python] Generate type stubs for dialect extensions (PR #236657)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 29 21:08:07 PDT 2026
================
@@ -598,6 +636,32 @@ function(add_mlir_python_modules name)
_process_target(${name} ${sources_target} "${_mlir_python_support_libs}")
endforeach()
+ if(MLIR_PYTHON_STUBGEN_ENABLED)
+ # Import package initializers only after its native extensions and Python
+ # sources are ready. Depend on concrete targets, not the package aggregate:
+ # the latter also depends on the generated stubs and would form a cycle.
+ set(_stubgen_inputs ${ARG_STUBGEN_DEPENDS_TARGETS})
+ foreach(sources_target ${_flat_targets})
----------------
PragmaTwice wrote:
Yah this is conservative. I'll find a way to simplify.
https://github.com/llvm/llvm-project/pull/236657
More information about the Mlir-commits
mailing list