[ota] Skip partition-access OTA sources when the feature is disabled (#18532)

This commit is contained in:
J. Nick Koston
2026-08-20 10:00:11 -04:00
committed by GitHub
parent 8ef0f38f4e
commit 2d62ea78d2
+7
View File
@@ -182,4 +182,11 @@ def FILTER_SOURCE_FILES() -> list[str]:
for define in CORE.defines for define in CORE.defines
): ):
files.append("ota_signature_esp_idf.cpp") files.append("ota_signature_esp_idf.cpp")
# ota_bootloader_esp_idf.cpp and ota_partitions_esp_idf.cpp are fully
# #ifdef'd on USE_OTA_PARTITIONS (set by the esphome OTA platform when
# allow_partition_access is enabled). Filter them out otherwise for the
# same reason as above.
if not any(define.name == "USE_OTA_PARTITIONS" for define in CORE.defines):
files.append("ota_bootloader_esp_idf.cpp")
files.append("ota_partitions_esp_idf.cpp")
return files return files