Just a note about this:
I like this. I hope you don't mind if I borrow some of these ideas to
play with. C_COMPILER_WORKS is something I've never heard of.
I'm also working on building a clang-based toolchain from scratch.
To avoid CMake bailing out when a binary can't be linked, I use: