From 05c9b649aa62c27446abc01424d552aa57493122 Mon Sep 17 00:00:00 2001 From: Sreeram Date: Mon, 2 Nov 2026 22:53:03 -0800 Subject: [PATCH 1/2] Fix Windows ROCm builds failing to link with unable to find mt.exe and stop one ROCm version cancelling the others --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59f18ef6b211..33047df4fc59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,6 +59,8 @@ jobs: runs-on: ubuntu-24.04 strategy: + # Each ROCm version is an independent product, so one version failing must not cancel the others and hide their real result. + fail-fast: false matrix: include: - ROCM_VERSION: "7.14.0" @@ -820,6 +822,8 @@ jobs: runs-on: windows-2022 strategy: + # Same as ubuntu-24-rocm: one ROCm version failing must not cancel the others. + fail-fast: false matrix: include: - ROCM_VERSION: "7.14.0" @@ -921,6 +925,18 @@ jobs: # Keep venv in PATH for subsequent steps echo "C:\TheRock\build\.venv\Scripts" >> $env:GITHUB_PATH + # Upstream embeds an application manifest in every .exe (ggml-org/llama.cpp#31329). + - name: Put the Windows SDK manifest tool on PATH + run: | + $ErrorActionPreference = "Stop" + $kits = Join-Path ${env:ProgramFiles(x86)} "Windows Kits\10\bin" + $mt = Get-ChildItem -Path (Join-Path $kits "10.*\x64\mt.exe") -ErrorAction SilentlyContinue | + Sort-Object { [version]$_.Directory.Parent.Name } -Descending | + Select-Object -First 1 + if (-not $mt) { throw "mt.exe not found under $kits; the Windows SDK is missing from this runner" } + write-host "Using $($mt.FullName)" + echo "$($mt.DirectoryName)" >> $env:GITHUB_PATH + - name: Build run: | mkdir build From 75b0a7b53834421be339825e949401923c91a0dc Mon Sep 17 00:00:00 2001 From: Sreeram Date: Mon, 2 Nov 2026 23:21:40 -0800 Subject: [PATCH 2/2] Find mt.exe inside the Windows ROCm Build step, append it to PATH and check that it starts --- .github/workflows/release.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33047df4fc59..faff4eb77668 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -925,20 +925,23 @@ jobs: # Keep venv in PATH for subsequent steps echo "C:\TheRock\build\.venv\Scripts" >> $env:GITHUB_PATH - # Upstream embeds an application manifest in every .exe (ggml-org/llama.cpp#31329). - - name: Put the Windows SDK manifest tool on PATH + - name: Build run: | - $ErrorActionPreference = "Stop" - $kits = Join-Path ${env:ProgramFiles(x86)} "Windows Kits\10\bin" - $mt = Get-ChildItem -Path (Join-Path $kits "10.*\x64\mt.exe") -ErrorAction SilentlyContinue | + # Upstream embeds an application manifest in every .exe (ggml-org/llama.cpp#31329). + # ROCm's lld-link hands that to mt.exe from the Windows SDK, which is not on PATH outside a VS developer shell. + # mt.exe can't be copied out on its own (it fails to start without its SDK siblings), so append its whole folder for this step only. + # Appending keeps it from shadowing anything already on PATH. + $mt = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\mt.exe" -ErrorAction SilentlyContinue | + Where-Object { $_.Directory.Parent.Name -match '^\d+(\.\d+){1,3}$' } | Sort-Object { [version]$_.Directory.Parent.Name } -Descending | Select-Object -First 1 - if (-not $mt) { throw "mt.exe not found under $kits; the Windows SDK is missing from this runner" } + if (-not $mt) { throw "mt.exe not found in the Windows SDK; lld-link needs it to embed app manifests" } write-host "Using $($mt.FullName)" - echo "$($mt.DirectoryName)" >> $env:GITHUB_PATH + $env:PATH = "$env:PATH;$($mt.DirectoryName)" + # A negative exit code is an NTSTATUS from the loader (e.g. a missing DLL), not mt.exe's own usage error. + mt.exe /? | Out-Null + if ($LASTEXITCODE -lt 0) { throw ("mt.exe could not start (0x{0:X8})" -f $LASTEXITCODE) } - - name: Build - run: | mkdir build cd build cmake .. `