debug symbol level: Use config instead

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2024-12-04 17:26:22 +08:00 committed by Xiang Xiao
parent dcea1b90e7
commit cc88063646
7 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -21,7 +21,7 @@
############################################################################
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g3
ARCHOPTIMIZATION = $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)

View file

@ -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)

View file

@ -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)

View file

@ -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)