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
Reviewed-by: Alice Ryhl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Apr 2, 2024
1 parent b481dd8 commit b8b2096
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 b8b2096

Please sign in to comment.