Read the extracted flag sets in the pch emission

The write_project split moved cxxflags into _resolve_flag_sets's
return; the pch layer's two reads follow it.
This commit is contained in:
J. Nick Koston
2026-09-23 23:22:57 +01:00
parent 90a7c1dde2
commit ef3f6d3951
+2 -2
View File
@@ -1251,7 +1251,7 @@ def write_project(paths: InstalledPaths, ccache: str | None) -> bool:
# edge (hundreds of edges in a real project)
lines.append(f"srcflags = {' '.join(src_other + include_flags)}")
src_cxx_override = None
if pch_enabled() and any(tok.startswith("-include") for tok in cxxflags):
if pch_enabled() and any(tok.startswith("-include") for tok in flag_sets.cxxflags):
# $cxxflags expands first, so a user -include there means GCC would
# never load the .gch
_LOGGER.warning(
@@ -1271,7 +1271,7 @@ def write_project(paths: InstalledPaths, ccache: str | None) -> bool:
# handles staleness. Strip resolved and raw build paths
# (symlinks) so identical configs share cache entries
flags_id = (
" ".join(cxxflags)
" ".join(flag_sets.cxxflags)
.replace(effective_ccache_basedir(), "")
.replace(str(CORE.build_path), "")
)