kbobyrev planned changes to this revision. kbobyrev added a comment. The current diff is rather messy and it is also blocked by the parent revision (https://reviews.llvm.org/D50894). It is likely to change if the parent CMake structure is changed. https://reviews.llvm.org/D51090