clang/ld.lld: clang17 and above support the option --print-memory-usage

1. cmake uses clang++ as a connector, and does not currently support:
	clang++: error: unknown argument: '-wl,--print-memory-usage'
	clang++: error: no input files

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2024-10-29 16:58:08 +08:00 committed by Xiang Xiao
parent c22b39d8d7
commit 083f9d162e
1 changed files with 2 additions and 0 deletions

View File

@ -216,6 +216,8 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y)
ifeq "17.0" "$(word 1, $(sort 17.0 $(CLANGVER)))"
TOOLCHAIN_CLANG_OPTION = -target
ARCHCPUFLAGS += --target=arm-none-eabi
LDFLAGS += --print-memory-usage
else
TOOLCHAIN_CLANG_OPTION = --config
endif