[PR #14226] [CLOSED] Fix build without precompiled headers (/p:PrecompiledHeaders=Create) #30015

Open
opened 2026-01-31 09:38:11 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14226
Author: @awakecoding
Created: 10/15/2022
Status: Closed

Base: mainHead: fix-precompiled-headers


📝 Commits (1)

  • acbc9d2 Fix build without precompiled headers (/p:PrecompiledHeaders=Create)

📊 Changes

7 files changed (+7 additions, -7 deletions)

View changed files

📝 src/common.build.pre.props (+1 -1)
📝 src/terminal/adapter/adaptDispatchGraphics.cpp (+1 -1)
📝 src/terminal/adapter/telemetry.cpp (+1 -1)
📝 src/terminal/parser/telemetry.cpp (+1 -1)
📝 src/tools/lnkd/main.cpp (+1 -1)
📝 src/tools/pixels/main.cpp (+1 -1)
📝 src/tools/test/main.cpp (+1 -1)

📄 Description

Summary of the Pull Request

This pull request fixes makes the csproj PrecompiledHeaders property overridable at the msbuild command-line (/p:PrecompiledHeaders=Create). The previous default value is kept (/p:PrecompiledHeaders=Use) which enables precompiled headers.

Building without precompiled headers revealed 6 occurrences where include <precomp.h> was used instead of include "precomp.h", which broke the build. Those broken includes are fixed with this pull request.

Precompiled headers in Windows Terminal produce extremely large files (some over 1GB) which causes problems with the limited space available in GitHub Actions Windows runners. Precompiled headers are supposed to be a means of optimization, but in the case of Windows Terminal, it creates new problems. The default is still to use them, but it's good to have the option to build without precompiled headers.

Validation

As for validation, I made a special branch on my GitHub Actions workflow to build Windows Terminal for x64 and arm64 with and without precompiled headers so we can compare the total build time:
https://github.com/awakecoding/wt-distro/actions/runs/3253700300/jobs/5341196693


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/14226 **Author:** [@awakecoding](https://github.com/awakecoding) **Created:** 10/15/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-precompiled-headers` --- ### 📝 Commits (1) - [`acbc9d2`](https://github.com/microsoft/terminal/commit/acbc9d28a7aa816ce7065687910406b1a31adac1) Fix build without precompiled headers (/p:PrecompiledHeaders=Create) ### 📊 Changes **7 files changed** (+7 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/common.build.pre.props` (+1 -1) 📝 `src/terminal/adapter/adaptDispatchGraphics.cpp` (+1 -1) 📝 `src/terminal/adapter/telemetry.cpp` (+1 -1) 📝 `src/terminal/parser/telemetry.cpp` (+1 -1) 📝 `src/tools/lnkd/main.cpp` (+1 -1) 📝 `src/tools/pixels/main.cpp` (+1 -1) 📝 `src/tools/test/main.cpp` (+1 -1) </details> ### 📄 Description ## Summary of the Pull Request This pull request fixes makes the csproj PrecompiledHeaders property overridable at the msbuild command-line (/p:PrecompiledHeaders=Create). The previous default value is kept (/p:PrecompiledHeaders=Use) which enables precompiled headers. Building without precompiled headers revealed 6 occurrences where include <precomp.h> was used instead of include "precomp.h", which broke the build. Those broken includes are fixed with this pull request. Precompiled headers in Windows Terminal produce extremely large files (some over 1GB) which causes problems with the limited space available in GitHub Actions Windows runners. Precompiled headers are supposed to be a means of optimization, but in the case of Windows Terminal, it creates new problems. The default is still to use them, but it's good to have the option to build without precompiled headers. ## Validation As for validation, I made a special branch on my GitHub Actions workflow to build Windows Terminal for x64 and arm64 with and without precompiled headers so we can compare the total build time: https://github.com/awakecoding/wt-distro/actions/runs/3253700300/jobs/5341196693 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:38:11 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30015