set(LLVM_LINK_COMPONENTS
Support
)
get_property(mindspore_translation_libs GLOBAL PROPERTY MINDSPORE_TRANSLATION_LIBS)
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
get_property(translation_libs GLOBAL PROPERTY MLIR_TRANSLATION_LIBS)
set(LIBS
${dialect_libs}
${mindspore_translation_libs}
${translation_libs}
MLIRIR
MLIRBufferizationTransforms
MLIRTosaDialect
MLIRLinalgDialect
)
link_directories(${AKG_BIN_LIB_DIR})
add_executable(mindspore-translate mindspore-translate.cpp)
add_dependencies(mindspore-translate ${LIBS})
llvm_expand_pseudo_components(TARGET_LIBS AllTargetsCodeGens)
SET(targets_to_link)
FOREACH(t ${TARGET_LIBS})
LIST(APPEND targets_to_link "LLVM${t}")
ENDFOREACH(t)
llvm_update_compile_flags(mindspore-translate)
target_link_libraries(mindspore-translate PRIVATE ${LIBS} ${targets_to_link})
mlir_check_all_link_libraries(mindspore-translate)