| 1 |
set(LLVM_LINK_COMPONENTS |
| 2 |
Option |
| 3 |
Support |
| 4 |
) |
| 5 |
|
| 6 |
set(link_libs |
| 7 |
clangBasic |
| 8 |
clangCodeGen |
| 9 |
clangDriver |
| 10 |
clangOptions |
| 11 |
clangExtractAPI |
| 12 |
clangFrontend |
| 13 |
clangRewriteFrontend |
| 14 |
) |
| 15 |
|
| 16 |
set(deps) |
| 17 |
|
| 18 |
if(CLANG_ENABLE_CIR) |
| 19 |
list(APPEND deps |
| 20 |
MLIRBuiltinOpsIncGen |
| 21 |
) |
| 22 |
list(APPEND link_libs |
| 23 |
clangCIRFrontendAction |
| 24 |
MLIRCIRTransforms |
| 25 |
MLIRIR |
| 26 |
MLIRPass |
| 27 |
) |
| 28 |
list(APPEND deps |
| 29 |
MLIRBuiltinLocationAttributesIncGen |
| 30 |
MLIRBuiltinTypeInterfacesIncGen |
| 31 |
) |
| 32 |
|
| 33 |
include_directories(${LLVM_MAIN_SRC_DIR}/../mlir/include) |
| 34 |
include_directories(${CMAKE_BINARY_DIR}/tools/mlir/include) |
| 35 |
endif() |
| 36 |
|
| 37 |
if(CLANG_ENABLE_STATIC_ANALYZER) |
| 38 |
list(APPEND link_libs |
| 39 |
clangStaticAnalyzerFrontend |
| 40 |
) |
| 41 |
endif() |
| 42 |
|
| 43 |
add_clang_library(clangFrontendTool |
| 44 |
ExecuteCompilerInvocation.cpp |
| 45 |
|
| 46 |
DEPENDS |
| 47 |
ClangDriverOptions |
| 48 |
${deps} |
| 49 |
|
| 50 |
LINK_LIBS |
| 51 |
${link_libs} |
| 52 |
) |
| 53 |
|
| 54 |
if(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) |
| 57 |
endif() |