You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without the argument, clang (clang-tidy) discovers a gcc installation
automatically on the system, for example,
```
% clang -v
Ubuntu clang version 18.1.8 (++20240731024944+3b5b5c1ec4a3-1~exp1~20240731145000.144)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13
```
However, users may want to switch off the discovery and specify a
version, exactly.
```
% clang -v --gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/12
Ubuntu clang version 18.1.8 (++20240731024944+3b5b5c1ec4a3-1~exp1~20240731145000.144)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
```
This is especially relevant for, but not limited to, hermetic
toolchains.
See also
This patch ports erenon/bazel_clang_tidy#88
to rules_lint.
0 commit comments