Lines Matching +full:cmake +full:- +full:opts
3 # Use of this source code is governed by a BSD-style license that can be
8 This looks at projects we care about (currently only clang-tidy, though
10 warning appears. These bugs are intended to keep us up-to-date with new
33 def _build_llvm(llvm_dir: str, build_dir: str) -> None:
35 targets = ["clang-tidy"]
36 # use `-C $llvm_dir` so the failure is easier to handle if llvm_dir DNE.
38 ["ninja", "-C", build_dir] + targets,
44 # Sometimes the directory doesn't exist, sometimes incremental cmake
52 "cmake",
53 "-G",
55 "-DCMAKE_BUILD_TYPE=MinSizeRel",
56 "-DLLVM_USE_LINKER=lld",
57 "-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra",
58 "-DLLVM_TARGETS_TO_BUILD=X86",
69 ) -> Dict[str, List[str]]:
72 clang_tidy = os.path.join(os.path.abspath(build_dir), "bin", "clang-tidy")
74 [clang_tidy, "-checks=*", "-list-checks"],
75 # Use cwd='/' to ensure no .clang-tidy files are picked up. It
80 encoding="utf-8",
95 return {"clang-tidy": available_checks}
100 ) -> Tuple[Dict[str, List[str]], Dict[str, List[str]]]:
155 def main(argv: List[str]) -> None:
167 "--llvm_dir", required=True, help="LLVM directory to check. Required."
170 "--llvm_build_dir",
175 "--state_file",
180 "--dry_run",
185 opts = parser.parse_args(argv)
187 build_dir = opts.llvm_build_dir
188 dry_run = opts.dry_run
189 llvm_dir = opts.llvm_dir
190 state_file = opts.state_file
193 with open(state_file, encoding="utf-8") as f:
213 "Skipping new state file writing and bug filing; dry-run "
219 with open(new_state_file_path, "w", encoding="utf-8") as f: