Closed matbech closed 1 year ago
I see the problem now... You should not be using intrin.h
from the MSVC toolset when building with clang-cl. You should be using the intrin.h
that comes with your clang/LLVM.
While you can get it to "build" with the intrin.h from MSVC, it doesn't actually work at runtime and thus crashes.
Note that I specifically test clang/LLVM for Window as integrated into Visual Studio. I'm not sure what exactly Clang Power Tools is setting up.
Thank you for pointing this out. I will report the issue to Clang Power Tools.
With clang-cl (15.0.4) using Clang Power Tools, I'm getting the following compiler error in XMVerifyCPUSupport:
The problem is that with clang-cl, both
__clang__
and_MSC_VER
are defined. And in this case intrin.h is included in DirectXMath.h (https://github.com/microsoft/DirectXMath/blob/main/Inc/DirectXMath.h#L117) and__cpuid
from this header should be used.