Starting with Rust 1.100.0 (expected 2026-11-12), the `-Zprofile-sample-use` flag has been stabilized as `-Cprofile-sample-use` and the former is not available anymore [1]. Without this change, when building with `CLANG_AUTOFDO_PROFILE` set, one gets in the latest betas and nightlies: error: unknown unstable option: `profile-sample-use` Thus pass the right name. Cc: stable@vger.kernel.org # Needed in 7.3.y. Link: https://github.com/rust-lang/rust/pull/155942 [1] Signed-off-by: Miguel Ojeda --- I can take it via `rust-fixes` to get it in for the release, but please let me know if you prefer to do something else. Thanks! scripts/Makefile.autofdo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.autofdo b/scripts/Makefile.autofdo index 57a3aba6ffc2..32c18df237f1 100644 --- a/scripts/Makefile.autofdo +++ b/scripts/Makefile.autofdo @@ -13,7 +13,7 @@ endif ifdef CLANG_AUTOFDO_PROFILE CFLAGS_AUTOFDO_CLANG += -fprofile-sample-use=$(CLANG_AUTOFDO_PROFILE) -ffunction-sections CFLAGS_AUTOFDO_CLANG += -fsplit-machine-functions - RUSTFLAGS_AUTOFDO_CLANG += -Zprofile-sample-use=$(CLANG_AUTOFDO_PROFILE) -Zfunction-sections=y + RUSTFLAGS_AUTOFDO_CLANG += $(if $(call rustc-min-version,110000),-Cprofile-sample-use,-Zprofile-sample-use)=$(CLANG_AUTOFDO_PROFILE) -Zfunction-sections=y RUSTFLAGS_AUTOFDO_CLANG += -Cllvm-args=-split-machine-functions endif base-commit: 57d916a3eb765ee0577d269bb2ac1bdf3a7a7f40 -- 2.56.0