Build Windows Terminal using clang-cl instead of msvc #22193

Closed
opened 2026-01-31 08:06:09 +00:00 by claunia · 1 comment
Owner

Originally created by @Andarwinux on GitHub (Aug 30, 2024).

Description of the new feature/enhancement

Windows Terminal seem have had to disable PGO recently due to a bug in msvc. Maybe consider trying clang-cl, which is usually much faster than msvc.

Proposed technical implementation details (optional)

https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170

Originally created by @Andarwinux on GitHub (Aug 30, 2024). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Windows Terminal seem have had to disable PGO recently due to a bug in msvc. Maybe consider trying clang-cl, which is usually much faster than msvc. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170 <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 08:06:09 +00:00
Author
Owner

@DHowett commented on GitHub (Aug 30, 2024):

I actually do maintain a ClangCL pipeline for Terminal!

It does not necessarily perform better, and it introduces an extra AddRef/Release pair around every WinRT object interaction which results in additional virtual dispatches in many critical call sites.

See https://github.com/microsoft/cppwinrt/issues/1273 for more info on that.

I am not likely to push to productize the ClangCL build because the toolchain definition is incompatible with the “UAP” platform build targets. I will, however, continue to maintain the branch because it keeps us honest and compliant.

@DHowett commented on GitHub (Aug 30, 2024): I actually do maintain a ClangCL pipeline for Terminal! It does not necessarily perform better, and it introduces an extra AddRef/Release pair around every WinRT object interaction which results in additional virtual dispatches in many critical call sites. See https://github.com/microsoft/cppwinrt/issues/1273 for more info on that. I am not likely to push to productize the ClangCL build because the toolchain definition is incompatible with the “UAP” platform build targets. I will, however, continue to maintain the branch because it keeps us honest and compliant.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22193