Skip to content

Commit cd9a954

Browse files
ojedafbq
authored andcommitted
kbuild: rust: use -Zdwarf-version to support DWARFv5
Rust 1.64.0 introduced (unstable) support for the `-Zdwarf-version` flag, which allows to select DWARFv5, thus use it. Link: rust-lang/rust#103057 Link: rust-lang/rust#98350 Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20240217002602.57270-1-ojeda@kernel.org
1 parent 4cece76 commit cd9a954

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/Makefile.debug

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ endif
1717
DEBUG_CFLAGS += $(debug-flags-y)
1818
KBUILD_AFLAGS += $(debug-flags-y)
1919

20+
ifdef CONFIG_DEBUG_INFO_DWARF4
21+
DEBUG_RUSTFLAGS += -Zdwarf-version=4
22+
else ifdef CONFIG_DEBUG_INFO_DWARF5
23+
DEBUG_RUSTFLAGS += -Zdwarf-version=5
24+
endif
25+
2026
ifdef CONFIG_DEBUG_INFO_REDUCED
2127
DEBUG_CFLAGS += -fno-var-tracking
2228
DEBUG_RUSTFLAGS += -Cdebuginfo=1

0 commit comments

Comments
 (0)