Skip to content

clang-cl-xwin: name llvm-mt at configure when it is missing - #8158

Draft
lordra9-svg wants to merge 1 commit into
ItsNotRexed:mainfrom
lordra9-svg:llvm-mt-configure-check
Draft

lordra9-svg wants to merge 1 commit into
ItsNotRexed:mainfrom
lordra9-svg:llvm-mt-configure-check

Conversation

@lordra9-svg

@lordra9-svg lordra9-svg commented Nov 23, 2026 •

Copy link
Copy Markdown

Claimed in the coordination issue as: #7333 (comment)

Depends on: #7347 (touches the same toolchain file; see "Overlap" below)

What and why

The clang-cl-xwin toolchain defaults CMAKE_MT to llvm-mt, and CMake runs it after every link to merge
manifests. Homebrew's LLVM formula on Linux does not install llvm-mt, so a host that follows docs/testing.md
compiles the whole tree and then dies at the first link with a bare
MT: command "llvm-mt" ... no such file or directory, with nothing saying which tool is missing or how to fix it.

This resolves CMAKE_MT with find_program in runtime/cmake/clang-cl-xwin.cmake and stops at configure time with
the tool's name and the two ways out:

CMAKE_MT (llvm-mt-does-not-exist) was not found.  The cross-build links
with lld-link and then runs llvm-mt to merge manifests; Homebrew's LLVM
formula does not install llvm-mt.  Install LLVM from your distribution or
pass -DCMAKE_MT=<path to llvm-mt>.

docs/testing.md says the same next to the xwin commands.

Overlap

#7347 (labj1987) fixes the other missing Homebrew tool in this file — dumpbin/CMAKE_DLLTOOL for SDL3 — and
already touches the same region. This change adds an independent block after the existing tool loop, so the two
should rebase cleanly either way; the second one to land just keeps both blocks.

Tested

On Bazzite 45 (Fedora 45), clang-cl 23.1.6 (AMDGPU target), xwin SDK 10.0.26100, CMake/Ninja from Homebrew, Wine
11.0-staging in a Fedora 43 distrobox, RADV Mesa 26.2.7 on a Radeon RX 7800 XT (gfx1101):

  • -DCMAKE_MT=llvm-mt-does-not-exist fails at configure with the message above, before any compile.
  • A normal configure with no CMAKE_MT still succeeds, and the full runtime/build/windows cross-build links every
    target (143 test executables); llvm-mt comes from PATH.
  • gameinput, loader, pe_loader and d3d12_vulkan_device run under Wine; the first three pass, the last skips
    every comparison because Wine exposes no host D3D12 device.
  • python -I tests/test_i18n_index.py and python3 -m compileall make_game.py tools tests pass.

python -I tests/test_docs_links.py fails on docs/dev-tools.md → ../runtime/README.md#a-600-frame-headless-guest-scene.
That is pre-existing: it fails identically on upstream/main at 042c5f378, because the powershell fence opened
at runtime/README.md:459 is never closed. It is already claimed as EGEN-RUNTIME-README-FENCE (#7351) with #8169
open for the fence and #7935 for the checker's fence pairing, so this pull request leaves it alone.

AI-assisted: yes (OpenCode)

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no
    translator change)

The toolchain defaults CMAKE_MT to llvm-mt, and CMake runs it after every
link to merge manifests. A host without it (Homebrew's LLVM on Linux does
not install llvm-mt) failed at link time with a bare
`MT: command "llvm-mt" ... no such file or directory`, after the whole
build had compiled.

Resolve CMAKE_MT with find_program in the toolchain file and stop at
configure time with the tool's name and the two fixes: install LLVM from
the distribution, or pass -DCMAKE_MT=<path>. docs/testing.md says the
same next to the xwin commands.

Tested on Bazzite 45 (Fedora 45), clang-cl 23.1.6, xwin SDK 10.0.26100:
- -DCMAKE_MT=llvm-mt-does-not-exist fails at configure with the new message
- the normal configure and the full cross-build still succeed
- gameinput, loader and pe_loader pass under Wine 11.0
@lordra9-svg
lordra9-svg force-pushed the llvm-mt-configure-check branch from 27ca05a to 061a310 Compare November 23, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant