Skip to content

[Flang][Windows] Disable PCH on Windows for flangFrontend #134726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions flang/lib/Frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,16 @@ add_flang_library(flangFrontend
clangDriver
)

target_precompile_headers(flangFrontend PRIVATE
[["flang/Parser/parsing.h"]]
[["flang/Parser/parse-tree.h"]]
[["flang/Parser/dump-parse-tree.h"]]
[["flang/Lower/PFTBuilder.h"]]
[["flang/Lower/Bridge.h"]]
)
# Precompiled Headers for flangFrontend
# Only enable PCH on non-Windows platforms, as the current usage of
# target_precompile_headers appears fragile during incremental builds
# involving CMake regeneration specifically on Windows.
if(NOT WIN32)
target_precompile_headers(flangFrontend PRIVATE
[["flang/Parser/parsing.h"]]
[["flang/Parser/parse-tree.h"]]
[["flang/Parser/dump-parse-tree.h"]]
[["flang/Lower/PFTBuilder.h"]]
[["flang/Lower/Bridge.h"]]
)
endif()