From ef3f6d3951df5bd48ff5b3760706b390832c49c2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 23 Sep 2026 23:22:57 +0100 Subject: [PATCH] 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. --- esphome/build_gen/arduino8266.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/build_gen/arduino8266.py b/esphome/build_gen/arduino8266.py index 7bb9fee2e08..024955ff9d3 100644 --- a/esphome/build_gen/arduino8266.py +++ b/esphome/build_gen/arduino8266.py @@ -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), "") )