From 0201093cf7d7b52061a06123ac9df566604dd68a Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sat, 17 Feb 2024 01:26:22 +0100 Subject: [PATCH] kbuild: rust: use `-Zdebuginfo-compression` Rust 1.74.0 introduced (unstable) support for the `-Zdebuginfo-compression` flag, thus use it. Link: https://github.com/rust-lang/rust/issues/120953 Link: https://github.com/rust-lang/rust/pull/115358 Signed-off-by: Miguel Ojeda Link: https://lore.kernel.org/r/20240217002622.57322-1-ojeda@kernel.org --- scripts/Makefile.debug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/Makefile.debug b/scripts/Makefile.debug index 693452bc826aa6..107db997ce3899 100644 --- a/scripts/Makefile.debug +++ b/scripts/Makefile.debug @@ -35,10 +35,12 @@ endif ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZLIB DEBUG_CFLAGS += -gz=zlib +DEBUG_RUSTFLAGS += -Zdebuginfo-compression=zlib KBUILD_AFLAGS += -gz=zlib KBUILD_LDFLAGS += --compress-debug-sections=zlib else ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZSTD DEBUG_CFLAGS += -gz=zstd +DEBUG_RUSTFLAGS += -Zdebuginfo-compression=zstd KBUILD_AFLAGS += -gz=zstd KBUILD_LDFLAGS += --compress-debug-sections=zstd endif