Harden the pch script for Windows paths and make ignored pchs visible

This commit is contained in:
J. Nick Koston
2026-08-25 15:36:41 -05:00
parent 18eb05177b
commit d08c524f19
7 changed files with 45 additions and 16 deletions
@@ -97,7 +97,7 @@ def test_pch_script_builds_and_prepends_relative_include(tmp_path: Path) -> None
assert (proj / "esphome_pch.h.gch").is_file()
assert len((proj / "esphome_pch.h.gch.sum").read_text().strip()) == 64
# Relative include: an absolute path would poison ccache keys
assert scons_env.prepended == ["-include", "esphome_pch.h"]
assert scons_env.prepended == ["-Winvalid-pch", "-include", "esphome_pch.h"]
# ccache settings land on the SCons ENV only, never os.environ
assert scons_env["ENV"]["CCACHE_SLOPPINESS"] == "pch_defines,time_macros"
assert scons_env["ENV"]["CCACHE_PCH_EXTSUM"] == "true"