libclang_rt.ubsan_standalone-x86_64.a: No such file or directory

Hello,

I built using https://llvm.org/docs/CMake.html in a separate directory as well as the build2 directory.

Sounds like you need to build the ubsan runtime. When you run cmake, make sure compiler-rt is part of LLVM_ENABLE_PROJECTS, as in:
cmake -DLLVM_ENABLE_PROJECTS=llvm;clang;compiler-rt;lld;…

I believe it is not enabled by default.