brew install llvm , you should get the information like:
Congrats! The LLVM has been installed successfully.
.bashrc or .zshrc).export PATH="$PATH:/usr/local/opt/llvm/bin"
This will help cmake find llvm-config package directly, which will automatically help you configure the LLVM_HOME variable and the paths to LLVM headers and libraries.
Go to LLVM Release Download Page, download the latest prebuilt binaries.

wget [https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz](https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz) (v10.0.0, the latest version)
Extract the archive.
tar xvf[clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz](https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz)
.bashrc or .zshrc). Change PATH_TO_PREBUILT to directories you extract the prebuilt from last step.export PATH="$PATH:PATH_TO_PREBUILT"
This will help cmake find llvm-config package directly, which will automatically help you configure the LLVM_HOME variable and the paths to LLVM headers and libraries.