[all-commits] [llvm/llvm-project] 7add6b: [MLIR] add dependencies for all tablegen targets o...

stephenneuendorffer via All-commits all-commits at lists.llvm.org
Fri May 1 21:38:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7add6b6b73fdb3e1303ee911f7e2acfb6bb467c8
      https://github.com/llvm/llvm-project/commit/7add6b6b73fdb3e1303ee911f7e2acfb6bb467c8
  Author: Stephen Neuendorffer <stephen.neuendorffer at xilinx.com>
  Date:   2020-05-01 (Fri, 01 May 2020)

  Changed paths:
    M mlir/CMakeLists.txt
    M mlir/cmake/modules/AddMLIR.cmake
    M mlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt
    M mlir/include/mlir/Dialect/LoopOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/IR/CMakeLists.txt
    M mlir/include/mlir/Interfaces/CMakeLists.txt
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
    M mlir/lib/Parser/CMakeLists.txt

  Log Message:
  -----------
  [MLIR] add dependencies for all tablegen targets on 'mlir-headers'

In cmake, dependencies on generated files require some sophistication in the build system.  At build time, files are parsed to determine which headers they depend on and these dependencies are injected into the build system.  This works well with ninja, but has some constraints with the makefile generator.  According to the cmake documentation, this only works reliably within the same directory.

This patch expands the usage of mlir-headers to include all generated headers and adds an mlir-generic-headers target which triggers generation of dialect-independent headers.  These targets are used to express dependencies on generated headers.  This is mostly handled in AddMLIR.cmake and only a few CMakeLists.txt files need to change.

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




More information about the All-commits mailing list