llvm-project/mlir/lib/CAPI
Stella Laurenzo 2607209b3f Remove libMLIRPublicAPI DSO.
libMLIRPublicAPI.so came into existence early when the Python and C-API were being co-developed because the Python extensions need a single DSO which exports the C-API to link against. It really should never have been exported as a mondo library in the first place, which has caused no end of problems in different linking modes, etc (i.e. the CAPI tests depended on it).

This patch does a mechanical move that:

* Makes the C-API tests link directly to their respective libraries.
* Creates a libMLIRPythonCAPI as part of the Python bindings which assemble to exact DSO that they need.

This has the effect that the C-API is no longer monolithic and can be subset and used piecemeal in a modular fashion, which is necessary for downstreams to only pay for what they use. There are additional, more fundamental changes planned for how the Python API is assembled which should make it more out of tree friendly, but this minimal first step is necessary to break the fragile dependency between the C-API and Python API.

Downstream actions required:

* If using the C-API and linking against MLIRPublicAPI, you must instead link against its constituent components. As a reference, the Python API dependencies are in lib/Bindings/Python/CMakeLists.txt and approximate the full set of dependencies available.
* If you have a Python API project that was previously linking against MLIRPublicAPI (i.e. to add its own C-API DSO), you will want to `s/MLIRPublicAPI/MLIRPythonCAPI/` and all should be as it was. There are larger changes coming in this area but this part is incremental.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D106369
2021-07-20 17:58:28 -07:00
..
Conversion Add C bindings for mlir::ExecutionEngine 2021-03-03 18:19:40 +00:00
Debug [mlir] Improve debug flag management in Python bindings 2021-04-19 14:45:43 +02:00
Dialect Add more types to the LLVM dialect C API 2021-07-13 14:35:50 -07:00
ExecutionEngine [MLIR] Execution engine python binding support for shared libraries 2021-06-12 05:46:38 +05:30
IR [mlir][linalg][python] Add attribute support to the OpDSL. 2021-06-24 09:40:32 +00:00
Registration [mlir][capi] fix build issue with "all passes" registration 2021-05-27 14:57:21 -07:00
Transforms [mlir] NFC: fix trivial typos 2021-01-08 02:10:12 +09:00
CMakeLists.txt Remove libMLIRPublicAPI DSO. 2021-07-20 17:58:28 -07:00