[Mlir-commits] [mlir] build multi python bindings for mlir (PR #177143)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 27 06:34:06 PST 2026


PragmaTwice wrote:

> In other words, before this modification, if a software needed to support Python 3.9/3.10/3.11/3.12/..., it had to compile at least 5+ different LLVM tar packages—one for each Python version—to complete the release. After the modification, it only needs to configure the required Python versions, compile the LLVM package once, and obtain MLIR dynamic libraries for all those Python versions.

For Python versions 3.12 and above, we can use the [Stable ABI](https://docs.python.org/3.15/c-api/stable.html) to make the same shared library compatible with all Python versions. Since Python 3.9 has already reached EOL, we may currently need to compile three different versions (3.10/3.11/STABLE_ABI). As the Python [Support Window](https://devguide.python.org/versions/) progresses, the number of versions that need to be compiled will gradually decrease.

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


More information about the Mlir-commits mailing list