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

commit 79b82da476eacbd3b43a1eb9ccd8c0aa5614eead
Author: liwenxiang1 <[email protected]>
AuthorDate: Mon Jan 6 15:23:28 2025 +0800

    arch/x86_64: Add stack usage
    
    add stack usage tool
    
    Signed-off-by: liwenxiang1 <[email protected]>
---
 arch/x86_64/src/common/Toolchain.defs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/x86_64/src/common/Toolchain.defs 
b/arch/x86_64/src/common/Toolchain.defs
index d789417837b..6be1980d1a6 100644
--- a/arch/x86_64/src/common/Toolchain.defs
+++ b/arch/x86_64/src/common/Toolchain.defs
@@ -63,6 +63,14 @@ ifeq ($(CONFIG_ARCH_INTEL64_DISABLE_VECTORIZE),y)
   ARCHOPTIMIZATION += -fno-tree-vectorize
 endif
 
+ifeq ($(CONFIG_STACK_USAGE),y)
+  ARCHOPTIMIZATION += -fstack-usage
+endif
+
+ifneq ($(CONFIG_STACK_USAGE_WARNING),0)
+  ARCHOPTIMIZATION += -Wstack-usage=$(CONFIG_STACK_USAGE_WARNING)
+endif
+
 ARCHCFLAGS += -fno-common -Wno-attributes
 ARCHCXXFLAGS += -fno-common -Wno-attributes -nostdinc++
 

Reply via email to