[Mlir-commits] [mlir] [mlir][Python] create MLIRPythonSupport (PR #171775)
Jacques Pienaar
llvmlistbot at llvm.org
Fri Dec 26 21:26:59 PST 2025
================
@@ -356,8 +443,36 @@ function(add_mlir_python_modules name)
# Build the modules target.
add_custom_target(${name} ALL)
_flatten_mlir_python_targets(_flat_targets ${ARG_DECLARED_SOURCES})
+
+ # Build all support libs first.
+ set(_mlir_python_support_libs)
+ foreach(sources_target ${_flat_targets})
+ get_target_property(_source_type ${sources_target} mlir_python_SOURCES_TYPE)
+ if(_source_type STREQUAL "support")
+ get_target_property(_module_name ${sources_target} mlir_python_EXTENSION_MODULE_NAME)
+ # Use a similar mechanism as nanobind to help the runtime loader pick the correct lib.
+ set(_module_name "${_module_name}-${ARG_MLIR_BINDINGS_PYTHON_NB_DOMAIN}")
+ set(_extension_target "${name}.extension.${_module_name}.dso")
----------------
jpienaar wrote:
dso vs so?
https://github.com/llvm/llvm-project/pull/171775
More information about the Mlir-commits
mailing list