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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
ojeda authored and fbq committed Feb 17, 2024
1 parent 34d54d9 commit bbe370f
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 bbe370f

Please sign in to comment.