Now I would like to generate llvm bc and llvm IR
Looks clang is needed for that . but despite compilation clang is not found. Does it mean the is a need to compile twice with
-DLLVM_ENABLE_PROJECTS=“clang” ?
You’re not wrong, it is optional. However, when you use the default options you are building just llvm (the target backends, IR processing tools, etc.). Clang itself and anything else is opt in. I know that can be confusing given that there is the “llvm project” and “llvm”.
-DLLVM_ENABLE_PROJECTS="clang" will get you clang, as shown on that linked page.