mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 18:11:29 +00:00
[core] Leave the precompiled header off on Windows for a GCC with bug 14940 (#19875)
This commit is contained in:
@@ -178,6 +178,15 @@ def held_lock() -> Callable[..., Callable[..., None]]:
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _default_pch_knobs(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""The precompiled header knobs change what the generators emit; a value
|
||||
exported in the developer's or CI's shell must not reach the tests."""
|
||||
monkeypatch.delenv("ESPHOME_PCH_ENABLE", raising=False)
|
||||
"""The knob changes what the generators emit: no ambient value, and on,
|
||||
so the Windows runner asks no compiler."""
|
||||
monkeypatch.setenv("ESPHOME_PCH_ENABLE", "1")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def windows_gcc_rule(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""Windows host, knob unset: the compiler version decides."""
|
||||
from esphome.build_helpers import pch
|
||||
|
||||
monkeypatch.delenv("ESPHOME_PCH_ENABLE")
|
||||
monkeypatch.setattr(pch.sys, "platform", "win32")
|
||||
|
||||
Reference in New Issue
Block a user