mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
kbuild: rust: use -Zdebuginfo-compression
Rust 1.74.0 introduced (unstable) support for the `-Zdebuginfo-compression` flag, thus use it. Note that the releases built by the Rust project (i.e. the ones provided by rustup) do not enable support for zstd in their bundled LLVM (yet, at least), thus the Rust compiler will warn, but the build will proceed: warning: unknown debuginfo compression algorithm zstd - will fall back to uncompressed debuginfo Link: https://github.com/rust-lang/rust/issues/120953 Link: https://github.com/rust-lang/rust/pull/115358 Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240217002622.57322-1-ojeda@kernel.org [ Added note about zstd support in Rust-provided binaries. ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
b8b2096ab8
commit
dbef1811c8
@ -35,10 +35,12 @@ endif
|
|||||||
|
|
||||||
ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZLIB
|
ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZLIB
|
||||||
DEBUG_CFLAGS += -gz=zlib
|
DEBUG_CFLAGS += -gz=zlib
|
||||||
|
DEBUG_RUSTFLAGS += -Zdebuginfo-compression=zlib
|
||||||
KBUILD_AFLAGS += -gz=zlib
|
KBUILD_AFLAGS += -gz=zlib
|
||||||
KBUILD_LDFLAGS += --compress-debug-sections=zlib
|
KBUILD_LDFLAGS += --compress-debug-sections=zlib
|
||||||
else ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZSTD
|
else ifdef CONFIG_DEBUG_INFO_COMPRESSED_ZSTD
|
||||||
DEBUG_CFLAGS += -gz=zstd
|
DEBUG_CFLAGS += -gz=zstd
|
||||||
|
DEBUG_RUSTFLAGS += -Zdebuginfo-compression=zstd
|
||||||
KBUILD_AFLAGS += -gz=zstd
|
KBUILD_AFLAGS += -gz=zstd
|
||||||
KBUILD_LDFLAGS += --compress-debug-sections=zstd
|
KBUILD_LDFLAGS += --compress-debug-sections=zstd
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user