Does it change anything for other (non-static) test configurations?
I don't expect there should be any difference. This is only a cheap way to fix the issue that dependencies are not properly specified with the static library, i.e. check-cxx won't build the static library first when you run it. I looked into solving the underlying issue and it would complicate the CMake quite a bit in the current state of things, so I wanted to start by simplifying the CMake configuration (https://reviews.llvm.org/D97565 will enable that as a follow-up step).