Commit 31e07d71 authored by Stephen Neuendorffer's avatar Stephen Neuendorffer
Browse files

[MLIR] Move from add_dependencies() to DEPENDS

add_llvm_library and add_llvm_executable may need to create new targets with
appropriate dependencies.  As a result, it is not sufficient in some
configurations (namely LLVM_BUILD_LLVM_DYLIB=on) to only call
add_dependencies().  Instead, the explicit TableGen dependencies must
be passed to add_llvm_library() or add_llvm_executable() using the DEPENDS
keyword.

Differential Revision: https://reviews.llvm.org/D74930
parent c4c8fbde
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -9,10 +9,13 @@ add_toy_chapter(toyc-ch2
  parser/AST.cpp
  mlir/MLIRGen.cpp
  mlir/Dialect.cpp

  DEPENDS
  ToyCh2OpsIncGen

  )
include_directories(include/)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
add_dependencies(toyc-ch2 ToyCh2OpsIncGen)
target_link_libraries(toyc-ch2
  PRIVATE
    MLIRAnalysis
+4 −2
Original line number Diff line number Diff line
@@ -14,10 +14,12 @@ add_toy_chapter(toyc-ch3
  mlir/MLIRGen.cpp
  mlir/Dialect.cpp
  mlir/ToyCombine.cpp

  DEPENDS
  ToyCh3OpsIncGen
  ToyCh3CombineIncGen
  )

add_dependencies(toyc-ch3 ToyCh3OpsIncGen)
add_dependencies(toyc-ch3 ToyCh3CombineIncGen)
include_directories(include/)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
+6 −4
Original line number Diff line number Diff line
@@ -15,12 +15,14 @@ add_toy_chapter(toyc-ch4
  mlir/Dialect.cpp
  mlir/ShapeInferencePass.cpp
  mlir/ToyCombine.cpp

  DEPENDS
  ToyCh4OpsIncGen
  ToyCh4ShapeInferenceInterfaceIncGen
  ToyCh4CombineIncGen
  MLIRCallOpInterfacesIncGen
  )

add_dependencies(toyc-ch4 ToyCh4OpsIncGen)
add_dependencies(toyc-ch4 ToyCh4ShapeInferenceInterfaceIncGen)
add_dependencies(toyc-ch4 ToyCh4CombineIncGen)
add_dependencies(toyc-ch4 MLIRCallOpInterfacesIncGen)
include_directories(include/)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
+6 −4
Original line number Diff line number Diff line
@@ -16,12 +16,14 @@ add_toy_chapter(toyc-ch5
  mlir/LowerToAffineLoops.cpp
  mlir/ShapeInferencePass.cpp
  mlir/ToyCombine.cpp

  DEPENDS
  ToyCh5ShapeInferenceInterfaceIncGen
  ToyCh5OpsIncGen
  ToyCh5CombineIncGen
  MLIRCallOpInterfacesIncGen
  )

add_dependencies(toyc-ch5 ToyCh5ShapeInferenceInterfaceIncGen)
add_dependencies(toyc-ch5 ToyCh5OpsIncGen)
add_dependencies(toyc-ch5 ToyCh5CombineIncGen)
add_dependencies(toyc-ch5 MLIRCallOpInterfacesIncGen)
include_directories(include/)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
+6 −4
Original line number Diff line number Diff line
@@ -18,12 +18,14 @@ add_toy_chapter(toyc-ch6
  mlir/LowerToLLVM.cpp
  mlir/ShapeInferencePass.cpp
  mlir/ToyCombine.cpp

  DEPENDS
  ToyCh6ShapeInferenceInterfaceIncGen
  ToyCh6OpsIncGen
  ToyCh6CombineIncGen
  MLIRCallOpInterfacesIncGen
  )

add_dependencies(toyc-ch6 ToyCh6ShapeInferenceInterfaceIncGen)
add_dependencies(toyc-ch6 ToyCh6OpsIncGen)
add_dependencies(toyc-ch6 ToyCh6CombineIncGen)
add_dependencies(toyc-ch6 MLIRCallOpInterfacesIncGen)
include_directories(include/)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
Loading