[all-commits] [llvm/llvm-project] ac521d: [mlir] Leverage CMake interface libraries for mlir...

Stella Stamenova via All-commits all-commits at lists.llvm.org
Tue Jun 28 10:43:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac521d9ecde70bc8ad11d9e605b43658014fb5af
      https://github.com/llvm/llvm-project/commit/ac521d9ecde70bc8ad11d9e605b43658014fb5af
  Author: Stella Stamenova <stilis at microsoft.com>
  Date:   2022-06-28 (Tue, 28 Jun 2022)

  Changed paths:
    M mlir/cmake/modules/AddMLIRPython.cmake
    M mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt
    M mlir/python/CMakeLists.txt

  Log Message:
  -----------
  [mlir] Leverage CMake interface libraries for mlir python

This is already partially the case, but we can rely more heavily on interface libraries and how they are imported/exported in other to simplify the implementation of the mlir python functions in Cmake.

This change also makes a couple of other changes:
1) Add a new CMake function which handles "pure" sources. This was done inline previously
2) Moves the headers associated with CAPI libraries to the libraries themselves. These were previously managed in a separate source target. They can now be added directly to the CAPI libraries using DECLARED_HEADERS.
3) Cleanup some dependencies that showed up as an issue during the refactor

This is a big CMake change that should produce no impact on the build of mlir and on the produced *build tree*. However, this change fixes an issue with the *install tree* of mlir which was previously unusable for projects like torch-mlir because both the "pure" and "extension" targets were pointing to either the build or source trees.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D128230




More information about the All-commits mailing list