opteesp: consolidate stripped elf generation
Move the generation and installation code of stripped elf files needed
by the opteesp environment to a common place. The intent is to remove
code duplication and to make creating new deployments easier and more
robust.
Change-Id: I4088dc47c13dc9f35f6b35fb44afee620303bac3
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/environments/opteesp/component.cmake b/environments/opteesp/component.cmake
index 526d8c8..f05b12a 100644
--- a/environments/opteesp/component.cmake
+++ b/environments/opteesp/component.cmake
@@ -19,6 +19,12 @@
endif()
ts_add_uuid_to_exe_name(TGT "${TGT}" UUID "${SP_BIN_UUID_CANON}" )
+get_target_property(_tgt_type ${TGT} TYPE)
+if ("${_tgt_type}" STREQUAL "EXECUTABLE")
+ compiler_generate_stripped_elf(TARGET ${TGT} NAME "${SP_BIN_UUID_CANON}.stripped.elf" RES STRIPPED_ELF)
+ install(FILES ${STRIPPED_ELF} DESTINATION ${TS_ENV}/bin)
+endif()
+
target_sources(${TGT} PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/optee_sp_header.c"
"${CMAKE_CURRENT_LIST_DIR}/sp_assert.c"