Ninja check-all failed for llvm12.0.0

Hi, everyone. I use wsl2 under win10 to build llvm. The linux edition is Ubuntun22.04 and the llvm edition is 12.0.0. I use the following command:
cmake -G Ninja -DLLVM_ENABLE_PROJECTS=clang ../llvm -DCMAKE_BUILD_TYPE=Release
ninja check-all
And i meet the following error:

The following is the edition of the tools i use:

I want to know the reason for the error. Thank you!

The actual error message should be visible earlier in the ninja check-all output, but you have only shown the last few lines. If you do such a build, make sure to log everything to a file, otherwise it can be hard to find any error messages.

That said, llvm 12.0.0 is very old by now, and it is probably expected that there were still unresolved bugs in the RISC-V support. Please try llvm 16.0.0 instead, which has just been released, or clone the repository from GitHub - llvm/llvm-project: The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at, and use the main branch.