The minimum set of flags would be
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/where/to/install
-DLLVM_ENABLE_ASSERTIONS:BOOL=ON
-DLLVM_ENABLE_PROJECTS='llvm'
Edit: This will build LLVM only, i.e. the headers and codegen libraries. If we want to build a compiler that can compile C/C++ code, we’d need to do something else (there are scripts to build an entire release).