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.
This commit is contained in:
Sudeep Mohanty
2026-09-09 10:53:14 +02:00
parent da3e20988f
commit 671713d66f
@@ -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"
"$<TARGET_FILE:${CMAKE_PROJECT_NAME}.elf>" "${CMAKE_OBJDUMP}"
"$<TARGET_FILE:${elf}>" "${CMAKE_OBJDUMP}"
COMMENT "Verifying ESP_FAULT_ASSERT() survived optimization"
VERBATIM)