Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: simplify `RUSTC_VERSION` Kconfig conditions

With the Rust version bump in place, several Kconfig conditions based on
`RUSTC_VERSION` are always true.

Thus simplify them.

The minimum supported major LLVM version by our new Rust minimum version
is now LLVM 18, instead of LLVM 16. However, there are no possible
cleanups for `RUSTC_LLVM_VERSION`.

Reviewed-by: Tamir Duberstein <tamird@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260405235309.418950-9-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+1 -15
+1 -2
arch/Kconfig
··· 968 968 config HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC 969 969 def_bool y 970 970 depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS 971 - depends on RUSTC_VERSION >= 107900 972 971 depends on ARM64 || X86_64 973 972 # With GCOV/KASAN we need this fix: https://github.com/rust-lang/rust/pull/129373 974 - depends on (RUSTC_LLVM_VERSION >= 190103 && RUSTC_VERSION >= 108200) || \ 973 + depends on RUSTC_LLVM_VERSION >= 190103 || \ 975 974 (!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS) 976 975 977 976 config CFI_PERMISSIVE
-8
arch/arm64/Kconfig
··· 291 291 config RUSTC_SUPPORTS_ARM64 292 292 def_bool y 293 293 depends on CPU_LITTLE_ENDIAN 294 - # Shadow call stack is only supported on certain rustc versions. 295 - # 296 - # When using the UNWIND_PATCH_PAC_INTO_SCS option, rustc version 1.80+ is 297 - # required due to use of the -Zfixed-x18 flag. 298 - # 299 - # Otherwise, rustc version 1.82+ is required due to use of the 300 - # -Zsanitizer=shadow-call-stack flag. 301 - depends on !SHADOW_CALL_STACK || RUSTC_VERSION >= 108200 || RUSTC_VERSION >= 108000 && UNWIND_PATCH_PAC_INTO_SCS 302 294 303 295 config CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS 304 296 def_bool CC_IS_CLANG
-3
arch/riscv/Kconfig
··· 232 232 config RUSTC_SUPPORTS_RISCV 233 233 def_bool y 234 234 depends on 64BIT 235 - # Shadow call stack requires rustc version 1.82+ due to use of the 236 - # -Zsanitizer=shadow-call-stack flag. 237 - depends on !SHADOW_CALL_STACK || RUSTC_VERSION >= 108200 238 235 239 236 config CLANG_SUPPORTS_DYNAMIC_FTRACE 240 237 def_bool CC_IS_CLANG
-2
init/Kconfig
··· 2193 2193 depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO) 2194 2194 depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC 2195 2195 select CFI_ICALL_NORMALIZE_INTEGERS if CFI 2196 - depends on !CALL_PADDING || RUSTC_VERSION >= 108100 2197 2196 depends on !KASAN_SW_TAGS 2198 - depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300 2199 2197 help 2200 2198 Enables Rust support in the kernel. 2201 2199