update build infrastructure for llvm-16.0.6
Update build infrastructure for LLVM 13.0.0.
riscv64 clang support.With several fixes from review integrated.ok patrick@