This is continuing in the path of D51714, which did this for Clang.
I have rearranged the source code Clang so one can diff the top-level
CMakeLists.txt of Clang and LLD, ensuring we use the same strategy for
both.
Besides diffing the two files, git diff --color-moved on LLD also helps review.
I assume these are re-arranged to match what you're doing in lld. Is that correct?
Generally it is preferred to do this kind of non-functional restructuring in a separate commit from the commit with a functional change to make it easier to review the functional changes.
This patch as-is seems to have cleanup to clang, and a functional change for lld. Those should likely be two separate commits.