Skip to content

Commit b22684a

Browse files
committed
ld: Make linker print memory usage
The memory usage info from the linker is a more precise value of how much memory is used.
1 parent 4c3f4c2 commit b22684a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,5 +538,7 @@ if(CMAKE_CROSSCOMPILING)
538538
if(NOT CMAKE_BUILD_TYPE STREQUAL "DEBUG")
539539
target_compile_options(${name}.elf PRIVATE "-Werror")
540540
endif()
541+
542+
target_link_libraries(${name}.elf PRIVATE -Wl,--print-memory-usage)
541543
endforeach()
542544
endif()

0 commit comments

Comments
 (0)