aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Åstrand <per.astrand@arm.com>2021-03-29 15:58:16 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-05-04 07:50:25 +0000
commit6440bba43e6842047c8b7ef1e48b786a3c1c2e01 (patch)
tree42181b4537ea7bc29cb94c36ac38f9d50350be2a
parent0954a8a3c5e54ff086c529d5ec00d5c6a80dbc59 (diff)
downloadethos-u-core-platform-6440bba43e6842047c8b7ef1e48b786a3c1c2e01.tar.gz
Output .map files for executable targets
Generate the map file for each executable target added with the helper function ethosu_add_executable. Change-Id: Ib8b26508f7c439c8cd12b90061cc42eb771d9fd5
-rw-r--r--cmake/helpers.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/helpers.cmake b/cmake/helpers.cmake
index 8676cd3..21d3a24 100644
--- a/cmake/helpers.cmake
+++ b/cmake/helpers.cmake
@@ -90,6 +90,12 @@ function(ethosu_add_executable target)
ethosu_eval_link_options(${target})
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang")
+ target_link_options(${target} PRIVATE --map --list=${target}.map)
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ target_link_options(${target} PRIVATE -Xlinker -Map=${target}.map)
+ endif()
+
ethosu_add_binaries(${target})
endfunction()