Skip to content

Commit

Permalink
kbuild: rust: use -Zdwarf-version to support DWARFv5
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ojeda authored and fbq committed Mar 1, 2024
1 parent 7c2bfd8 commit 80f9737
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/Makefile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ endif
DEBUG_CFLAGS += $(debug-flags-y)
KBUILD_AFLAGS += $(debug-flags-y)

ifdef CONFIG_DEBUG_INFO_DWARF4
DEBUG_RUSTFLAGS += -Zdwarf-version=4
else ifdef CONFIG_DEBUG_INFO_DWARF5
DEBUG_RUSTFLAGS += -Zdwarf-version=5
endif

ifdef CONFIG_DEBUG_INFO_REDUCED
DEBUG_CFLAGS += -fno-var-tracking
DEBUG_RUSTFLAGS += -Cdebuginfo=1
Expand Down

0 comments on commit 80f9737

Please sign in to comment.