When using clang++
on Windows, it typically falls back to Microsoft’s linker to do the final state of executable output. I don’t follow the LLVM project
closely, but my limited understanding is that they are actively working on a Windows-compatible linker, but it’s not ready for production use yet.
Of course, clang++ can only fall back to Microsoft’s linker if it can actually find
it. And one of the biggest problems with using clang on Windows is that it often can’t.
I would love to tell you the reason why it can’t find the linker, link.exe. But I can only really tell you a pseudo-answer, which is why the code
that’s checked into clang can’t find the linker. The reason why that code exists and does the things it does… well, that I can’t even pretend to understand.
In a sane world, clang++ would have a command line switch that worked like this: