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 cc88063646 debug symbol level: Use config instead
cc88063646 is described below
commit cc880636460982f3d334064a95eb7d89ecde70ff
Author: wangmingrong1 <[email protected]>
AuthorDate: Wed Dec 4 17:26:22 2024 +0800
debug symbol level: Use config instead
Signed-off-by: wangmingrong1 <[email protected]>
---
Kconfig | 1 +
arch/tricore/src/common/ToolchainGnuc.defs | 2 +-
arch/tricore/src/common/ToolchainTasking.defs | 2 +-
arch/x86/src/common/Toolchain.defs | 2 +-
tools/D.defs | 2 +-
tools/Rust.defs | 2 +-
tools/Swift.defs | 2 +-
7 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Kconfig b/Kconfig
index 5938852151..636d982bc4 100644
--- a/Kconfig
+++ b/Kconfig
@@ -2495,6 +2495,7 @@ config DEBUG_SYMBOLS
config DEBUG_SYMBOLS_LEVEL
string "Custom symbols level"
+ depends on DEBUG_SYMBOLS
default "-g"
---help---
This string represents the custom symbol level that will be
diff --git a/arch/tricore/src/common/ToolchainGnuc.defs
b/arch/tricore/src/common/ToolchainGnuc.defs
index 163d574eab..450390a4c0 100644
--- a/arch/tricore/src/common/ToolchainGnuc.defs
+++ b/arch/tricore/src/common/ToolchainGnuc.defs
@@ -166,7 +166,7 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
- ARCHOPTIMIZATION += -g
+ ARCHOPTIMIZATION += $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
LDFLAGS += --no-warn-rwx-segments
diff --git a/arch/tricore/src/common/ToolchainTasking.defs
b/arch/tricore/src/common/ToolchainTasking.defs
index c4a6d66e50..cf121918ee 100644
--- a/arch/tricore/src/common/ToolchainTasking.defs
+++ b/arch/tricore/src/common/ToolchainTasking.defs
@@ -76,7 +76,7 @@ ARCHOPTIMIZATION += --tradeoff=2
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION += --debug-info=default
ARCHOPTIMIZATION += --keep-temporary-files
- LDFLAGS += -g
+ LDFLAGS += $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
# merge source code with assembly output
diff --git a/arch/x86/src/common/Toolchain.defs
b/arch/x86/src/common/Toolchain.defs
index 84bc7e4ea0..4f8a6da769 100644
--- a/arch/x86/src/common/Toolchain.defs
+++ b/arch/x86/src/common/Toolchain.defs
@@ -21,7 +21,7 @@
############################################################################
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
- ARCHOPTIMIZATION = -g3
+ ARCHOPTIMIZATION = $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)
diff --git a/tools/D.defs b/tools/D.defs
index 8c0209a897..c8a2144005 100644
--- a/tools/D.defs
+++ b/tools/D.defs
@@ -25,7 +25,7 @@ DC := ldmd2
DFLAGS := -i
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
- DFLAGS += -g
+ DFLAGS += $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
ifeq ($(CONFIG_DEBUG_NOOPT),y)
diff --git a/tools/Rust.defs b/tools/Rust.defs
index df68a4a79a..c3ca78298c 100644
--- a/tools/Rust.defs
+++ b/tools/Rust.defs
@@ -25,7 +25,7 @@ RUSTC := rustc --edition 2021
RUSTFLAGS :=
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
- RUSTFLAGS += -g
+ RUSTFLAGS += $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
ifeq ($(CONFIG_DEBUG_NOOPT),y)
diff --git a/tools/Swift.defs b/tools/Swift.defs
index 65af970299..9667b357c7 100644
--- a/tools/Swift.defs
+++ b/tools/Swift.defs
@@ -27,7 +27,7 @@ SWIFTC := swiftc
SWIFTFLAGS := -enable-experimental-feature Embedded -wmo
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
- SWIFTFLAGS += -g
+ SWIFTFLAGS += $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
ifeq ($(CONFIG_DEBUG_NOOPT),y)