diff --git a/components/bootloader_support/CMakeLists.txt b/components/bootloader_support/CMakeLists.txt index 4f4f71702d8..9a91d1c10e9 100644 --- a/components/bootloader_support/CMakeLists.txt +++ b/components/bootloader_support/CMakeLists.txt @@ -105,9 +105,13 @@ else() esp_hal_clock esp_hal_security) endif() +# src/flash_encrypt.c includes esp_security/esp_key_mgr.h on +# SOC_KEY_MANAGER_SUPPORTED targets. flash_encrypt.c is in the unconditional +# srcs list, so declare the dep unconditionally for all build variants. +list(APPEND priv_requires esp_security) + if(BOOTLOADER_BUILD) list(APPEND srcs "src/bootloader_panic.c") - list(APPEND priv_requires esp_security) if(CONFIG_SECURE_FLASH_ENC_ENABLED) list(APPEND srcs "src/flash_encryption/flash_encrypt.c"