1 import("//clang/lib/StaticAnalyzer/Frontend/enable.gni")
2 import("//llvm/utils/gn/build/write_cmake_config.gni")
5 config("clang-tidy-config_Config") {
6 visibility = [ ":clang-tidy-config" ]
7 include_dirs = [ "$target_gen_dir" ]
10 write_cmake_config("clang-tidy-config") {
11 input = "clang-tidy-config.h.cmake"
12 output = "$target_gen_dir/clang-tidy-config.h"
15 if (clang_tidy_enable_static_analyzer) {
16 values += [ "CLANG_TIDY_ENABLE_STATIC_ANALYZER=1" ]
18 values += [ "CLANG_TIDY_ENABLE_STATIC_ANALYZER=" ]
21 # Let targets depending on this find the generated file.
22 public_configs = [ ":clang-tidy-config_Config" ]
25 static_library("clang-tidy") {
26 output_name = "clangTidy"
27 configs += [ "//llvm/utils/gn/build:clang_code" ]
30 "//clang/include/clang/StaticAnalyzer/Checkers",
32 "//clang/lib/ASTMatchers",
35 "//clang/lib/Frontend",
37 "//clang/lib/Rewrite",
39 "//clang/lib/Serialization",
40 "//clang/lib/Tooling",
41 "//clang/lib/Tooling/Core",
45 if (clang_tidy_enable_static_analyzer) {
47 "//clang/lib/StaticAnalyzer/Core",
48 "//clang/lib/StaticAnalyzer/Frontend",
55 "ClangTidyDiagnosticConsumer.cpp",
56 "ClangTidyModule.cpp",
57 "ClangTidyOptions.cpp",
58 "ClangTidyProfiling.cpp",
59 "ExpandModularHeadersPPCallbacks.cpp",
61 "NoLintDirectiveHandler.cpp",
66 # If you add a check, also add it to ClangTidyForceLinker.h.
68 "//clang-tools-extra/clang-tidy/abseil",
69 "//clang-tools-extra/clang-tidy/altera",
70 "//clang-tools-extra/clang-tidy/android",
71 "//clang-tools-extra/clang-tidy/boost",
72 "//clang-tools-extra/clang-tidy/bugprone",
73 "//clang-tools-extra/clang-tidy/cert",
74 "//clang-tools-extra/clang-tidy/concurrency",
75 "//clang-tools-extra/clang-tidy/cppcoreguidelines",
76 "//clang-tools-extra/clang-tidy/darwin",
77 "//clang-tools-extra/clang-tidy/fuchsia",
78 "//clang-tools-extra/clang-tidy/google",
79 "//clang-tools-extra/clang-tidy/hicpp",
80 "//clang-tools-extra/clang-tidy/linuxkernel",
81 "//clang-tools-extra/clang-tidy/llvm",
82 "//clang-tools-extra/clang-tidy/llvmlibc",
83 "//clang-tools-extra/clang-tidy/misc",
84 "//clang-tools-extra/clang-tidy/modernize",
85 "//clang-tools-extra/clang-tidy/objc",
86 "//clang-tools-extra/clang-tidy/openmp",
87 "//clang-tools-extra/clang-tidy/performance",
88 "//clang-tools-extra/clang-tidy/portability",
89 "//clang-tools-extra/clang-tidy/readability",
90 "//clang-tools-extra/clang-tidy/zircon",
92 if (clang_tidy_enable_static_analyzer) {
93 deps += [ "//clang-tools-extra/clang-tidy/mpi" ]