Merge branch 'platformio-pch-rp2' into platformio-pch-libretiny

This commit is contained in:
J. Nick Koston
2026-08-25 15:05:58 -05:00
6 changed files with 58 additions and 11 deletions
+2 -4
View File
@@ -6,7 +6,7 @@ import subprocess
import time
from typing import Any
from esphome.build_helpers.pch import pch_enabled
from esphome.build_helpers.pch import pch_extra_scripts
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.const import (
@@ -421,9 +421,7 @@ async def to_code(config: ConfigType) -> None:
]
if not enable_scanf_float:
extra_scripts.append("pre:remove_float_scanf.py")
# Generation-time gate: the script itself has no enable check
if pch_enabled():
extra_scripts.append("post:pch.py")
extra_scripts.extend(pch_extra_scripts())
extra_scripts.append("post:post_build.py")
cg.add_platformio_option("extra_scripts", extra_scripts)
+5 -7
View File
@@ -6,7 +6,7 @@ from string import ascii_letters, digits
import subprocess
from typing import Any
from esphome.build_helpers.pch import pch_enabled
from esphome.build_helpers.pch import pch_extra_scripts
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.const import (
@@ -341,12 +341,10 @@ async def to_code(config: ConfigType) -> None:
cg.add_define("ESPHOME_VARIANT", VARIANT_FRIENDLY[variant])
cg.add_define(ThreadModel.SINGLE)
extra_scripts = ["pre:ccache.py"]
# Generation-time gate: the script itself has no enable check
if pch_enabled():
extra_scripts.append("post:pch.py")
extra_scripts.append("post:post_build.py")
cg.add_platformio_option("extra_scripts", extra_scripts)
cg.add_platformio_option(
"extra_scripts",
["pre:ccache.py", *pch_extra_scripts(), "post:post_build.py"],
)
conf = config[CONF_FRAMEWORK]
cg.add_platformio_option("framework", "arduino")