Building clang on Windows for MingW with CMake/Ninja

When I build clang on Windows for MingW with CMake/Ninja I get from Cmake:

-- Warning: LLVM will be built thread-unsafe because atomic builtins are missing
-- Could NOT find LibXml2 (missing: LIBXML2_INCLUDE_DIR)

The CMake setup finishes successfully. When I invoke clang++ with the options:

-c -x c++ -O0 -g -fno-inline -Wall -g -mthreads

I get:

clang++.exe: error: unknown argument: '-mthreads'

Is this because of either of the problems beforehand when CMake wqas used ? If so how do I correct the CMake problems ?

I think it’s because clang doesn’t know about -mthreads.

I think it's because clang doesn't know about -mthreads.

Does clang/Windows using the MingW/gcc RTL support multithreading ? If so is there a command line option for this ?

I think it's because clang doesn't know about -mthreads.

Does clang/Windows using the MingW/gcc RTL support multithreading ? If so is
there a command line option for this ?

IIRC, not yet.

I think it's because clang doesn't know about -mthreads.

Does clang/Windows using the MingW/gcc RTL support multithreading ? If so is
there a command line option for this ?

IIRC, not yet.

OK, Thanks ! That does not help with Boost testing as quite a few Boost libraries either need multi-threading or test for multi-threading as part of their overall tests.

neither the clang build with MingW/gcc RTL nor the clang-cl with VC++ RTL is really ready yet. For other more simplified uses of clang on Windows outside of Boost either may be fine.

I realize that clang developers have different priorities so I will revisit clang on Windows sometime in the future to see if some of the issues I have encountered have been resolved.

Thanks everybody for your help and good luck !