After f06abbb393800b0d466c88e283c06f75561c432c I have been seeing build
failures due to the obj.clang target missing a dependency on
tools/clang/clang-tablegen-targets.
This appears to be due to the fact that LLVM_COMMON_DEPENDS are not added
as dependencies to the object library.
This patch uses the same logic as llvm_add_library to register
dependencies for object libraries.
Unless I'm misunderstanding the behavior issues you're seeing here are a bug in our code not CMake. IIUC, the issue you're seeing is that since the objlib doesn't depend on the tablegen targets, it is likely failing to build or building out of order. That's clearly a bug in our code, not CMake.
I know that you copied that comment, but it doesn't seem relevant here, and I think it is describing a situation that isn't actually a bug in CMake.