Link error building compiler-rt

I’m having difficulty linking compiler-rt with linux. It looks like libclang_rt.ubsan_standalone isn’t linking in libc++abi, so the build fails with errors like:

/nix/store/74y3751gsixaz9797ib0hp7c658sp1y5-binutils-2.40/bin/ld: /build/llvm-project-6768a3d/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:178: undefined reference to typeinfo for __cxxabiv1::__vmi_class_type_info' /nix/store/74y3751gsixaz9797ib0hp7c658sp1y5-binutils-2.40/bin/ld: /build/llvm-project-6768a3d/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp:178: undefined reference to __dynamic_cast’

I already see an llvm issue for the same error linker error in a new llvm build · Issue #69056 · llvm/llvm-project · GitHub and I added a comment with my build details: linker error in a new llvm build · Issue #69056 · llvm/llvm-project · GitHub

Any idea what cmake options are missing or wrong?