Skip to content

Commit 7594302

Browse files
committed
kbuild: rust: rename flag to -Zdebuginfo-for-profiling for Rust >= 1.98
Starting with Rust 1.98.0 (expected 2026-08-20), the `-Zdebug-info-for-profiling` flag has been renamed to `-Zdebuginfo-for-profiling` (i.e. one less dash, to match `debuginfo`s in other flags) [1]. Without this change, one gets in the latest nightlies: error: unknown unstable option: `debug-info-for-profiling` Thus pass the right name. Link: rust-lang/rust#156887 [1] Reviewed-by: Alice Ryhl <aliceryhl@google.com> Acked-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20260602151638.14358-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 025fd4b commit 7594302

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/Makefile.autofdo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Enable available and selected Clang AutoFDO features.
44

55
CFLAGS_AUTOFDO_CLANG := -fdebug-info-for-profiling -mllvm -enable-fs-discriminator=true -mllvm -improved-fs-discriminator=true
6-
RUSTFLAGS_AUTOFDO_CLANG := -Zdebug-info-for-profiling -Cllvm-args=-enable-fs-discriminator=true -Cllvm-args=-improved-fs-discriminator=true
6+
RUSTFLAGS_AUTOFDO_CLANG := $(if $(call rustc-min-version,109800),-Zdebuginfo-for-profiling,-Zdebug-info-for-profiling) -Cllvm-args=-enable-fs-discriminator=true -Cllvm-args=-improved-fs-discriminator=true
77

88
ifndef CONFIG_DEBUG_INFO
99
CFLAGS_AUTOFDO_CLANG += -gmlt

0 commit comments

Comments
 (0)