[gn] port afa8aeeeec (RISCVGenExegesis.inc)
[llvm-project.git] / flang / tools / fir-opt / CMakeLists.txt
blob4c6dbf7d9c8c37fb9c61d60799333ed41c0a5cdb
1 add_flang_tool(fir-opt fir-opt.cpp)
2 llvm_update_compile_flags(fir-opt)
3 get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
4 get_property(extension_libs GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
6 if(FLANG_INCLUDE_TESTS)
7   set(test_libs
8     FIRTestAnalysis
9     MLIRTestIR
10     )
11 endif()
13 target_link_libraries(fir-opt PRIVATE
14   CUFAttrs
15   CUFDialect
16   FIRDialect
17   FIRSupport
18   FIRTransforms
19   FIRCodeGen
20   HLFIRDialect
21   HLFIRTransforms
22   FlangOpenMPTransforms
23   FIRAnalysis
24   ${test_libs}
25   ${dialect_libs}
26   ${extension_libs}
28   # TODO: these should be transitive dependencies from a target providing
29   # "registerFIRPasses()"
30   MLIRIR
31   MLIRLLVMDialect
32   MLIRPass
33   MLIRFuncToLLVM
34   MLIRTransforms
35   MLIRAffineToStandard
36   MLIRAnalysis
37   MLIRSCFToControlFlow
38   MLIRParser
39   MLIRSupport
40   MLIRVectorToLLVM
41   MLIROptLib