mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 15:27:33 +00:00
Exclude the prefix wrapper from esphome.h, state the failure-path cost honestly
This commit is contained in:
@@ -64,8 +64,9 @@ async def to_code(config: ConfigType) -> None:
|
||||
# Curated prefix for the pch (the script folds it plus defines.h):
|
||||
# host has no framework force-includes, and the per-TU cost is the
|
||||
# STL closure behind the core headers. Measured -43% compile CPU.
|
||||
# Gated so ESPHOME_PCH_ENABLE=0 restores the strict view; a
|
||||
# toolchain that cannot load its own pch hits the script's probe.
|
||||
# Gated so ESPHOME_PCH_ENABLE=0 restores the strict view. When the
|
||||
# .gch fails to build or load, the force-include stays and every TU
|
||||
# parses the closure as text: correct, but slower than no pch.
|
||||
cg.add_platformio_option("build_src_flags", f"-include {HOST_PCH_PREFIX}")
|
||||
|
||||
|
||||
|
||||
@@ -247,6 +247,7 @@ def copy_src_tree():
|
||||
Path(
|
||||
"esphome/core/ring_buffer.h"
|
||||
), # moved to components/ring_buffer/, removed in 2026.11.0
|
||||
Path("esphome/core/pch_prefix.h"), # build machinery, not user API
|
||||
}
|
||||
include_l = []
|
||||
for target, _ in source_files_l:
|
||||
|
||||
Reference in New Issue
Block a user