Fix windows clang compiling
_lzcnt_u64 may not supported by native LLVM compiler on Windows.
I don't have any issues with compiling mimalloc3 with LLVM under Visual Studio (for more than half a year), could you elaborate?
I don't have any issues with compiling mimalloc3 with LLVM under Visual Studio (for more than half a year), could you elaborate?
When you are using Visual-Studio, you are actually using clang-cl.exe instead of clang.exe, which the driver mode is like cl.exe instead of 'original' clang
I don't have any issues with compiling mimalloc3 with LLVM under Visual Studio (for more than half a year), could you elaborate?
When you are using Visual-Studio, you are actually using clang-cl.exe instead of clang.exe, which the driver mode is like cl.exe instead of 'original' clang
But you added the condition under the _MSC_VER definition, which assumes either clang-cl OR clang -fms-compatibility. Both of them should provide the function you're trying to toss off.
__clang__ is defined under both clang and clang-cl, so your check should be more precise either way. For example, set via a CMake feature test whether the function is available.
Hmm, yes, the current test seems correct; on my system clang-cl works fine? If you can test your scenario further why _lzcnt_u64 is not supported that would be great.