This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 083f9d162e clang/ld.lld: clang17 and above support the option
--print-memory-usage
083f9d162e is described below
commit 083f9d162eacfef3c446f319a4747bd2f5b8eda3
Author: wangmingrong1 <[email protected]>
AuthorDate: Tue Oct 29 16:58:08 2024 +0800
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 <[email protected]>
---
arch/arm/src/common/Toolchain.defs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/src/common/Toolchain.defs
b/arch/arm/src/common/Toolchain.defs
index a5df3d7fab..356b0313bb 100644
--- a/arch/arm/src/common/Toolchain.defs
+++ b/arch/arm/src/common/Toolchain.defs
@@ -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