cmake: show memory usage on zephyr.elf always

Fixes: #30591

Now using the `logical_target_for_zephyr_elf` variable for memusage
report.

The `logical_target_for_zephyr_elf` variable will point to the final
elf when two stage linking is done.

On single stage linking the prebuilt target == final elf, in which case
the `logical_target_for_zephyr_elf` points directly to the prebuilt
target.

Thus using `logical_target_for_zephyr_elf` for memusage report ensures
the correct elf file is always used for the memory usage report.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
1 file changed