Compile clang-tidy

I followed the Getting Started Guide to build LLVM (I am interested in clang-tidy), compilation completed successfully, but clang-tidy is nowhere to be found in build.

On Windows, my commands were git clone <llvm>, “mkdir & cd to build”, cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ../llvm, ninja -j1.

What am I doing wrong?

And another thing. The final size of my llvm-project is 67GB. This does not fit the expected size of 5GB I saw in build requirements. Something’s wrong! Any tip on reducing the project’s size?


1 Like

As for the 67GiB, you missed the “Note that Debug builds require a lot of time and disk space” note. Also note the “A full build of LLVM and Clang will need around 15-20 GB of disk space.”, which you are doing, and more, since clang-tidy is part of clang-tools-extra, which depends on clang.

1 Like

Somewhat tangential, but I would also recommend installing ccache. I’ve noticed it immensely speeds up my builds during development.

You can use it in cmake using the following flag:


Other useful tools (if you have access to compute clusters) are llama and distcc