Find clang-query binary.
()
| 65 | |
| 66 | |
| 67 | def _find_clang_query() -> str: |
| 68 | """Find clang-query binary.""" |
| 69 | import shutil |
| 70 | |
| 71 | system_path = Path("C:/Program Files/LLVM/bin/clang-query.exe") |
| 72 | if system_path.exists(): |
| 73 | return str(system_path) |
| 74 | |
| 75 | cache_path = ( |
| 76 | PROJECT_ROOT / ".cache" / "clang-tools" / "clang" / "bin" / "clang-query.exe" |
| 77 | ) |
| 78 | if cache_path.exists(): |
| 79 | return str(cache_path) |
| 80 | |
| 81 | found = shutil.which("clang-query") |
| 82 | if found: |
| 83 | return found |
| 84 | |
| 85 | return "" |
| 86 | |
| 87 | |
| 88 | # ============================================================================ |