How to make "clang on Windows" use LLVM libcxx instead of MSVC C++ library?

  c++, clang, windows

Follow-up question for Clang on Windows: how to disable the default MSVC compatibility?.

Context: "clang on Windows" uses MSVC C++ library:

$ /cygdrive/d/LLVM/13.0.0/bin/clang.exe P92092.C -fno-ms-compatibility -fno-ms-extensions
C:Program Files (x86)Microsoft Visual Studio19ProfessionalVCToolsMSVC.29.30133includevcruntime.h:364:18: error: expected ';' after top level declarator
_CRT_END_C_HEADER

Here we see that under -fno-ms-compatibility -fno-ms-extensions clang still uses MSVC C++ library.

Question: How to make "clang on Windows" use LLVM libcxx?

Source: Windows Questions

LEAVE A COMMENT