InstallRequiredSystemLibraries: No support for Clang GNU-like front-end targeting MSVC ABI
Issue InstallRequiredSystemLibraries doesn't find crt's to install when using Ninja/Ninja Multi-Config with clang (from LLVM).
Expected behaviour
-
InstallRequiredSystemLibraries
finds and installs all necessary crt DLLs.
Actual behaviour
- Nothing found and nothing installed.
Context
After a bit of investigation into the cmake default modules. From InstallRequiredSystemLibraries.cmake
:
...
if(MSVC)
# Here goes all the "find" code.
endif()
...
Obviously this doesn't work for LLVM clang installed on Windows. I expect it to work the same way as for MSVC.
I'm not aware if LLVM clang compiler always uses MSVC C++ runtime libraries (I guess if there is no such possibility right now it could be added later by LLVM, so I'd write the code to not expect clang to always use MSVC C++ runtime libraries). But I've default compiled with clang, took a look with Dependencies Walker, and the output executable refers to C:\Windows\system32\MSVCP140.dll
and to C:\Windows\system32\VCRUNTIME140.dll
.