Repository navigation
cmake : embed an app manifest in all Windows exes - #31329
Conversation
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
ggerganov
left a comment
There was a problem hiding this comment.
Giving the green light, though I'm not familiar with how the manifests in Windows work.
|
Also I removed the ggml-vulkan changes, which was technically correct but useless in practice |
|
@ggerganov Im not familiar with them either. I found this while looking for a clean way to keep |
|
To test on windows: |
|
I test it on a dedicated Windows 11 machine... |
ServeurpersoCom
left a comment
There was a problem hiding this comment.
Tested on Windows 11 with MSVC and CUDA: the manifest is in all 83 exes, a model loads and generates from a 350 char path and from non ASCII paths, the router spawns its child with an accented model path, and exec_shell_command still decodes the CP850 output of cmd. ctest behavior 30/30. LGTM!
The manifest from ggml-org#31329 already makes argv UTF-8. Fixes ggml-org#26416 Signed-off-by: Adrien Gallouët <angt@huggingface.co>
* cmake : embed an app manifest in all Windows exes Signed-off-by: Adrien Gallouët <angt@huggingface.co> * Remove LLAMA_WIN_APP_CMAKE Signed-off-by: Adrien Gallouët <angt@huggingface.co> --------- Signed-off-by: Adrien Gallouët <angt@huggingface.co>
The manifest from ggml-org#31329 already makes argv UTF-8. Fixes ggml-org#26416 Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Upstream ggml-org#31329 embeds an app manifest in every Windows executable. With ROCm's clang in MSVC mode, lld-link has to merge that manifest by invoking mt.exe, which is not on PATH outside a VS developer shell. Every windows-rocm build since b12013 failed at link time, and the release job then dropped the whole ROCm family, Ubuntu archives included. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Upstream ggml-org#31329 embeds an app manifest in every Windows executable. With ROCm's clang in MSVC mode, lld-link has to merge that manifest by invoking the Windows SDK's mt.exe, which isn't on PATH outside a VS developer environment. Every windows-rocm build since b12013 failed at link time, and the release job then dropped the whole ROCm family, Ubuntu archives included. Enter the VS developer shell before building so the MSVC-ABI toolchain gets the SDK tools it expects, and keep building with the runner's CMake instead of the copy VS bundles. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… positive ggml-org/llama.cpp#31329: a MEMBER's Windows test step `irm https://llama.app/install.ps1 | iex` fires `curl-pipe-shell` critical, since llama.app is not a known installer. The planner calls the change benign; the deterministic layer signals, and the corpus now counts it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
llama.cpp v0.9.0 で全 exe にアプリケーションマニフェストを埋め込む処理が 入った (ggml-org/llama.cpp#31329)。ROCm ビルドは VS 開発者シェルを通さずに ROCm clang + lld-link でリンクするため、マニフェストのマージで "lld-link: error: unable to find mt.exe in PATH" となり失敗していた。 scripts/Find-WindowsSdkMt.ps1 で最新の Windows SDK の mt.exe を探し、 ワークフローの Build ROCm ステップと Build-Rocm.ps1 で PATH の先頭に追加する。 ビルド環境が変わるため、ROCm ビルドキャッシュのキーにも新スクリプトを含める。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vazb8knSXCxaEyp4yoA94Y
Overview
Following #30417, we want to keep UTF-8 strings throughout the application. Relying on explicit conversions such as
u8path()is fragile. It compiles without warnings but breaks Unicode paths on Windows.This PR embeds a manifest that selects UTF-8 as the windows process code page, aligning default handling with our internal encoding. It also opts into long-path support (see #31102) and preserves decoding of legacy child-process output.
Conversions required by reusable libraries (
ggml,llama,mtmd) and explicit wide Win32 APIs remain where needed.Additional information
This prepares a follow-up cleanup of application code:
u8path()/.u8string()conversions with ordinary paths and strings.Requirements