I believe you can build rustc against a locally-installed LLVM (e.g. whatever your package manager gives you) instead of compiling LLVM yourself. Or you can put
[llvm]
download-ci-llvm = true
in rustc's config.toml to make the build download a prebuilt LLVM from rustc's CI instead of cloning the llvm-project repo and compiling that.
You will probably get more useful advice about building the compiler by asking on internals.rust-lang.org or Zulip instead of on users.rust-lang.org (which is focused on questions about using Rust).