Skip to content

cmake : embed an app manifest in all Windows exes - #31329

Merged
angt merged 2 commits into
ggml-org:masterfrom
angt:cmake-embed-an-app-manifest-in-all-windows-exes
Oct 30, 2026
Merged

angt merged 2 commits into
ggml-org:masterfrom
angt:cmake-embed-an-app-manifest-in-all-windows-exes

Conversation

@angt

@angt angt commented Oct 28, 2026

Copy link
Copy Markdown
Member

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:

  • Replace repetitive u8path() / .u8string() conversions with ordinary paths and strings.
  • Replace Windows-specific file-opening branches with standard file streams where possible.
  • Remove redundant Windows argument and environment conversion wrappers.

Requirements

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
@angt
angt requested review from a team and ggerganov as code owners October 28, 2026 17:15
@github-actions github-actions Bot added build Compilation issues Vulkan Issues specific to the Vulkan backend server ggml changes relating to the ggml tensor library for machine learning labels Oct 28, 2026
Signed-off-by: Adrien Gallouët <angt@huggingface.co>

@ggerganov ggerganov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving the green light, though I'm not familiar with how the manifests in Windows work.

@angt

angt commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Also I removed the ggml-vulkan changes, which was technically correct but useless in practice

@angt

angt commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

@ggerganov Im not familiar with them either. I found this while looking for a clean way to keep char * in function prototypes without having to put u8path() everywhere.

@angt

angt commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

To test on windows:

$env:LLAMA_BUCKET = "angt/install.sh"
$env:LLAMA_VERSION = "g01e69c109"
irm https://llama.app/install.ps1 | iex

@ServeurpersoCom

Copy link
Copy Markdown
Contributor

I test it on a dedicated Windows 11 machine...

@ServeurpersoCom ServeurpersoCom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@0cc4m
0cc4m removed the request for review from a team October 30, 2026 06:42
@0cc4m 0cc4m removed the Vulkan Issues specific to the Vulkan backend label Oct 30, 2026
@angt
angt merged commit d63fbfe into ggml-org:master Oct 30, 2026
26 of 29 checks passed
angt added a commit to angt/llama.cpp that referenced this pull request Oct 30, 2026
The manifest from ggml-org#31329 already makes argv UTF-8.

Fixes ggml-org#26416

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
angt added a commit that referenced this pull request Oct 30, 2026
The manifest from #31329 already makes argv UTF-8.

Fixes #26416

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 30, 2026
* 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>
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Nov 1, 2026
The manifest from ggml-org#31329 already makes argv UTF-8.

Fixes ggml-org#26416

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
sawansri added a commit to lemonade-sdk/llama.cpp that referenced this pull request Nov 2, 2026
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>
sawansri added a commit to lemonade-sdk/llama.cpp that referenced this pull request Nov 3, 2026
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>
qazbnm456 added a commit to qazbnm456/diff-sentry that referenced this pull request Nov 5, 2026
… 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>
@CISC CISC mentioned this pull request Nov 5, 2026
mitsuharu pushed a commit to mitsuharu/llama.cpp-windows-gpu-builder that referenced this pull request Nov 7, 2026
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
DanoPTT added a commit to DanoPTT/llama.cpp that referenced this pull request Nov 9, 2026
…#31329)

Upstream d63fbfe embeds an app manifest in every Windows exe; with clang++
in MSVC ABI mode lld-link needs mt.exe to merge it, and the r236 base build
failed linking llama-llava-cli with 'unable to find mt.exe in PATH'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Compilation issues ggml changes relating to the ggml tensor library for machine learning server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants