32f78fe3f2
Add a missed library that needs to be linked with mlir-opt. This results in a test failure in the MLIR due to the pass `-convert-gpu-to-spirv` not being found. PiperOrigin-RevId: 260773067
58 lines
995 B
CMake
58 lines
995 B
CMake
set(LLVM_OPTIONAL_SOURCES
|
|
null.cpp
|
|
)
|
|
|
|
set(LIB_LIBS
|
|
MLIRAnalysis
|
|
MLIRLLVMIR
|
|
MLIRParser
|
|
MLIRPass
|
|
MLIRTransforms
|
|
MLIRSupport
|
|
)
|
|
add_llvm_library(MLIRMlirOptLib
|
|
mlir-opt.cpp
|
|
)
|
|
target_link_libraries(MLIRMlirOptLib ${LIB_LIBS})
|
|
|
|
set(LIBS
|
|
MLIRAffineOps
|
|
MLIRLoopsToGPU
|
|
MLIRAnalysis
|
|
MLIRControlFlowToCFG
|
|
MLIREDSC
|
|
MLIRFxpMathOps
|
|
MLIRGPU
|
|
MLIRGPUtoNVVMTransforms
|
|
MLIRGPUtoSPIRVTransforms
|
|
MLIRLinalg
|
|
MLIRLLVMIR
|
|
MLIRLoopOps
|
|
MLIRNVVMIR
|
|
MLIROptMain
|
|
MLIRParser
|
|
MLIRPass
|
|
MLIRQuantizerTransforms
|
|
MLIRQuantOps
|
|
MLIRSPIRV
|
|
MLIRSPIRVConversion
|
|
MLIRStandardOps
|
|
MLIRStandardToLLVM
|
|
MLIRTransforms
|
|
MLIRTestDialect
|
|
MLIRTestTransforms
|
|
MLIRSupport
|
|
MLIRVectorOps
|
|
)
|
|
if(MLIR_CUDA_CONVERSIONS_ENABLED)
|
|
list(APPEND LIBS
|
|
MLIRGPUtoCUDATransforms
|
|
)
|
|
endif()
|
|
add_llvm_executable(mlir-opt
|
|
mlir-opt.cpp
|
|
)
|
|
llvm_update_compile_flags(mlir-opt)
|
|
whole_archive_link(mlir-opt ${LIBS})
|
|
target_link_libraries(mlir-opt PRIVATE MLIRIR MLIRMlirOptLib ${LIBS} LLVMSupport)
|