Windows Compiler Support
…
MSVC Version 193x
MSVC Version 192x
MSVC Version 191x
but the aforementioned versions of Visual Studio (at least 2019 and 2022) allow to use clang-cl.exe compiler as well.
So is it possible to use clang-cl instead of Microsoft’s cl compiler as a host compiler. I know about nvcc’s --ccbin option, but is it officially supported?
You must use cl.exe, the compiler that ships with Visual Studio with the Visual C++ support, as a host compiler for nvcc on “native” windows. (WSL2 is a separate case.)
The excerpted document portion for compiler support:
does not indicate Visual Studio, it indicates MSVC; that is Microsoft Visual C++, which is referring to a specific compiler toolchain from microsoft, not clang.
Here for example, we can see that microsoft differentiates MSVC from clang: