[PATCH] D129770: [docs] Note about how to handle 'llvm-mt: error: no libxml2'

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 06:38:09 PDT 2022


hans created this revision.
hans added reviewers: thakis, penzn.
Herald added a subscriber: mgorny.
Herald added a project: All.
hans requested review of this revision.
Herald added a project: LLVM.

See https://github.com/llvm/llvm-project/issues/55817 and https://discourse.llvm.org/t/cannot-cmake-self-hosted-clang-on-windows-for-lack-of-libxml2/58793

Not sure where is the best place to put this, but hopefully this will be found by those searching for the error message.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129770

Files:
  llvm/docs/CMake.rst


Index: llvm/docs/CMake.rst
===================================================================
--- llvm/docs/CMake.rst
+++ llvm/docs/CMake.rst
@@ -1066,10 +1066,25 @@
 
 Notes for specific compilers and/or platforms.
 
-Microsoft Visual C++
---------------------
+Windows
+-------
 
 **LLVM_COMPILER_JOBS**:STRING
   Specifies the maximum number of parallel compiler jobs to use per project
   when building with msbuild or Visual Studio. Only supported for the Visual
   Studio 2010 CMake generator. 0 means use all processors. Default is 0.
+
+**CMAKE_MT**:STRING
+  When compiling with clang-cl, recent CMake versions will default to selecting
+  `llvm-mt` as the Manifest Tool instead of Microsoft's `mt.exe`. This will
+  often cause errors like:
+
+  .. code-block:: console
+
+    -- Check for working C compiler: [...]clang-cl.exe - broken
+    [...]
+        MT: command [...] failed (exit code 0x1) with the following output:
+        llvm-mt: error: no libxml2
+        ninja: build stopped: subcommand failed.
+
+  To work around this error, set `CMAKE_MT=mt`.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129770.444634.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220714/39efa657/attachment.bin>


More information about the llvm-commits mailing list