58 lines · plain
1set(LLVM_LINK_COMPONENTS2 Option3 Support4 )5 6set(link_libs7 clangBasic8 clangCodeGen9 clangDriver10 clangOptions11 clangExtractAPI12 clangFrontend13 clangRewriteFrontend14 )15 16set(deps)17 18if(CLANG_ENABLE_CIR)19 list(APPEND deps20 MLIRBuiltinOpsIncGen21 )22 list(APPEND link_libs23 clangCIRFrontendAction24 MLIRCIRTransforms25 MLIRIR26 MLIRPass27 )28 list(APPEND deps29 MLIRBuiltinLocationAttributesIncGen30 MLIRBuiltinTypeInterfacesIncGen31 )32 33 include_directories(${LLVM_MAIN_SRC_DIR}/../mlir/include)34 include_directories(${CMAKE_BINARY_DIR}/tools/mlir/include)35endif()36 37if(CLANG_ENABLE_STATIC_ANALYZER)38 list(APPEND link_libs39 clangStaticAnalyzerFrontend40 )41endif()42 43add_clang_library(clangFrontendTool44 ExecuteCompilerInvocation.cpp45 46 DEPENDS47 ClangDriverOptions48 ${deps}49 50 LINK_LIBS51 ${link_libs}52 )53 54if(CLANG_ENABLE_CIR)55 target_include_directories(clangFrontendTool PRIVATE ${LLVM_MAIN_SRC_DIR}/../mlir/include)56 target_include_directories(clangFrontendTool PRIVATE ${CMAKE_BINARY_DIR}/tools/mlir/include)57endif()58