[mlir] Make Python bindings installable.
authorStella Laurenzo <stellaraccident@gmail.com>
Fri, 9 Oct 2020 22:50:07 +0000 (15:50 -0700)
committerStella Laurenzo <stellaraccident@gmail.com>
Mon, 12 Oct 2020 22:17:03 +0000 (15:17 -0700)
commit75ae846de69cccd6ed66357f3ee3ad3301849d95
treeffd2914e8e6ad0ba778f75f95ad34aa2622b95b8
parenta324d8f964bf421fa7d8b882b0f64ead28c4149c
[mlir] Make Python bindings installable.

* Links against libMLIR.so if the project is built for DYLIBs.
* Puts things in the right place in build and install time python/ trees so that RPaths line up.
* Adds install actions to install both the extension and sources.
* Copies py source files to the build directory to match (consistent layout between build/install time and one place to point a PYTHONPATH for tests and interactive use).
* Finally, "import mlir" from an installed LLVM just works.

Differential Revision: https://reviews.llvm.org/D89167
mlir/lib/Bindings/Python/CMakeLists.txt
mlir/lib/Bindings/Python/unix_version.lds [deleted file]
mlir/test/lit.cfg.py