Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
When I try to compile with clang.exe, there are come compile errors. I get the clang.exe from VS2022 distribution.
Note : unlike its sibling clang-cl.exe, this compiler does not disguise itself as MSVC, but GCC instead. However, it is still bona-fide Windows compiler, wrt ABI and Windows headers. The only GCC-ism about it is that it accepts the GCC style command parameters.
Execute below command in "x64 Native Tool Command Prompt" of VS2022 installation.
cmake .. -DCMAKE_C_COMPILER="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang.exe" -GNinja
|
ninja
|
It spits out some errors. Apparently, CMake wants to compile mariadb_config which needs
getopt.h and unistd.h.
There is also some stuff we had not seen for a long time, which is winsock.h vs winsock2.h headers.
see out.txt for a full output
A patch is attached. patch.diff