Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission

This commit is contained in:
J. Nick Koston
2026-08-21 20:22:05 -05:00
2 changed files with 9 additions and 2 deletions
+6 -1
View File
@@ -360,6 +360,9 @@ def _defines_flags(
return [
f"-D{d}"
for d in (
# Upstream reads this from the board manifest (build.f_cpu); all
# 45 supported boards ship 80000000L, so the value is hardcoded
# here rather than drift (same rationale as _MMU_DEFAULT)
"F_CPU=80000000L",
"__ets__",
"ICACHE_FLASH",
@@ -428,7 +431,9 @@ def _project_flags(
continue
libs.append(tok[2:])
else:
if tok == "-u" or tok.startswith(("-T", "-Xlinker")):
if tok in ("-u", "-e", "-s", "-static", "-nostartfiles") or tok.startswith(
("-T", "-Xlinker")
):
# Inert on the -c compile line; the firmware would silently
# lack the requested link behavior
raise EsphomeError(
@@ -1067,7 +1067,9 @@ def test_lexed_build_flags_shared_between_consumers(
)
@pytest.mark.parametrize("tok", ["-Tcustom.ld", "-Xlinker", "-u"])
@pytest.mark.parametrize(
"tok", ["-Tcustom.ld", "-Xlinker", "-u", "-e", "-s", "-static", "-nostartfiles"]
)
def test_project_flags_rejects_plain_linker_forms(tok: str) -> None:
"""A plain-form linker flag would land on the -c compile line where it
is inert; refuse naming the -Wl, form instead of shipping firmware that