Skip to content

Commit

Permalink
debug symbol level: Use config instead
Browse files Browse the repository at this point in the history
Signed-off-by: wangmingrong1 <[email protected]>
  • Loading branch information
W-M-R authored and xiaoxiang781216 committed Dec 4, 2024
1 parent dcea1b9 commit cc88063
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/tricore/src/common/ToolchainGnuc.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/tricore/src/common/ToolchainTasking.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/src/common/Toolchain.defs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
############################################################################

ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g3
ARCHOPTIMIZATION = $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif

ifneq ($(CONFIG_DEBUG_NOOPT),y)
Expand Down
2 changes: 1 addition & 1 deletion tools/D.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tools/Rust.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tools/Swift.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc88063

Please sign in to comment.