From 671713d66fb15348525e054a94c852e08aa96d11 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Wed, 9 Sep 2026 10:23:07 +0200 Subject: [PATCH] fix(esp_security): use EXECUTABLE in fault_assert_opt_check The post-build check named the executable target directly, which does not exist under Build system v2. Query the EXECUTABLE build property instead. --- .../test_apps/fault_assert_opt_check/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/esp_security/test_apps/fault_assert_opt_check/CMakeLists.txt b/components/esp_security/test_apps/fault_assert_opt_check/CMakeLists.txt index 853b87d4eaf..a312326051e 100644 --- a/components/esp_security/test_apps/fault_assert_opt_check/CMakeLists.txt +++ b/components/esp_security/test_apps/fault_assert_opt_check/CMakeLists.txt @@ -11,9 +11,10 @@ project(fault_assert_opt_check) # Regression guard: fail the build if ESP_FAULT_ASSERT() gets optimized away. idf_build_get_property(python PYTHON) +idf_build_get_property(elf EXECUTABLE) add_custom_command( - TARGET ${CMAKE_PROJECT_NAME}.elf POST_BUILD + TARGET ${elf} POST_BUILD COMMAND ${python} "${CMAKE_CURRENT_SOURCE_DIR}/check_fault_asserts.py" - "$" "${CMAKE_OBJDUMP}" + "$" "${CMAKE_OBJDUMP}" COMMENT "Verifying ESP_FAULT_ASSERT() survived optimization" VERBATIM)