Skip to content

fix: add missing #include <chrono> for Windows ARM64 build#446

Open
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Jah-yee:main
Open

fix: add missing #include <chrono> for Windows ARM64 build#446
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Jah-yee:main

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 13, 2026

Summary

This PR adds the missing #include <chrono> to common/common.cpp and common/log.cpp in the llama.cpp submodule to fix the Windows ARM64 (Snapdragon X Elite) build.

Problem

The Windows ARM64 build fails with errors:

  • error: no type named 'system_clock' in namespace 'std::chrono'
  • error: 'clock' is not a class, namespace, or enumeration

On Linux/Mac, <chrono> is pulled in transitively through <thread>. On Windows with ClangCL, this transitive include doesnt work, requiring an explicit include.

Fix

Added #include <chrono> to both files:

  • 3rdparty/llama.cpp/common/common.cpp
  • 3rdparty/llama.cpp/common/log.cpp

Testing

This fix is based on the analysis in issue #440 which documents the complete Windows ARM64 build requirements for Snapdragon X Elite.

Fixes issue #440

Jah-yee and others added 2 commits March 13, 2026 15:44
In setup_env.py (line 107) and utils/e2e_benchmark.py (line 23), the
sys.exit(1) was at the same indentation level as 'try', causing it to
run unconditionally after subprocess completes - even when the command
succeeds. This moves sys.exit(1) inside the except block where it
belongs.

Fixes: microsoft#447
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