MCPcopy Create free account
hub / github.com/FastLED/FastLED / find_iwyu_binary

Function find_iwyu_binary

ci/iwyu_wrapper.py:24–44  ·  view source on GitHub ↗

Find the actual include-what-you-use binary.

()

Source from the content-addressed store, hash-verified

22
23
24def find_iwyu_binary() -> str | None:
25 """Find the actual include-what-you-use binary."""
26 # Try system IWYU first (preferred)
27 iwyu = shutil.which("include-what-you-use")
28 if iwyu:
29 return iwyu
30
31 # Try clang-tool-chain cache directory
32 home = Path.home()
33 cache_dir = home / ".clang-tool-chain" / "iwyu"
34
35 # Search for include-what-you-use.exe in cache
36 if cache_dir.exists():
37 for path in cache_dir.rglob("include-what-you-use.exe"):
38 if path.is_file():
39 return str(path)
40 for path in cache_dir.rglob("include-what-you-use"):
41 if path.is_file():
42 return str(path)
43
44 return None
45
46
47def _resolve_fast_native_cxx(compiler_path: str) -> str:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected