set(LLVM_OPTIONAL_SOURCES
  Builders.cpp
  CoreAPIs.cpp
  Helpers.cpp
  Intrinsics.cpp
  )

add_llvm_library(MLIREDSC
  Builders.cpp
  Helpers.cpp
  Intrinsics.cpp

  ADDITIONAL_HEADER_DIRS
  ${MLIR_MAIN_INCLUDE_DIR}/mlir/EDSC
  )
add_dependencies(MLIREDSC MLIRReferenceImplementationTestGen)
target_link_libraries(MLIREDSC
  PUBLIC
    MLIRAffineOps
    MLIRLoopOps
    MLIRStandardOps
    MLIRTransformUtils
    MLIRVectorOps
    )

add_llvm_library(MLIREDSCInterface
  CoreAPIs.cpp

  ADDITIONAL_HEADER_DIRS
  ${MLIR_MAIN_INCLUDE_DIR}/mlir/EDSC
  )
add_dependencies(MLIREDSC MLIRReferenceImplementationTestGen)
target_link_libraries(MLIREDSC
  PUBLIC
    MLIRIR
    MLIRSupport
    MLIRParser
    )

set(LLVM_OPTIONAL_SOURCES
  Builders.cpp
  CoreAPIs.cpp
  Helpers.cpp
  Intrinsics.cpp
  )

add_llvm_library(MLIREDSC
  Builders.cpp
  Helpers.cpp
  Intrinsics.cpp

  ADDITIONAL_HEADER_DIRS
  ${MLIR_MAIN_INCLUDE_DIR}/mlir/EDSC
  )
add_dependencies(MLIREDSC MLIRReferenceImplementationTestGen)
target_link_libraries(MLIREDSC
  PUBLIC
    MLIRAffineOps
    MLIRLoopOps
    MLIRStandardOps
    MLIRTransformUtils
    MLIRVectorOps
    )

add_llvm_library(MLIREDSCInterface
  CoreAPIs.cpp

  ADDITIONAL_HEADER_DIRS
  ${MLIR_MAIN_INCLUDE_DIR}/mlir/EDSC
  )
add_dependencies(MLIREDSCInterface MLIRIR)
add_dependencies(MLIREDSC MLIRReferenceImplementationTestGen)
target_link_libraries(MLIREDSC
  PUBLIC
    MLIRIR
    MLIRSupport
    MLIRParser
    )

Add missing dependency on MLIRIR on MLIREDSCInterface
Add missing dependency on MLIRIR on MLIREDSCInterface

MLIRIR includes generated header for interfaces, including these headers require
an extra dependency to ensure these headers are generated before we attempt to
build MLIREDSCInterface.

PiperOrigin-RevId: 276518255
Change-Id: Ia43a55d2a131a2198c268cdfb792d007462f4a61
