aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig30
1 files changed, 16 insertions, 14 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 7484cd703bc1..e18fa242ed86 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -82,6 +82,21 @@ config RUSTC_LLVM_VERSION
int
default $(rustc-llvm-version)
+config RUSTC_LLVM_MAJOR_VERSION
+ int
+ default $(shell,expr $(rustc-llvm-version) / 10000)
+
+config RUSTC_CLANG_LLVM_COMPATIBLE
+ bool
+ default y if CC_IS_CLANG && RUSTC_LLVM_MAJOR_VERSION = $(shell,expr $(cc-version) / 10000)
+ help
+ This indicates whether Rust and Clang use LLVM of the same major
+ version.
+
+ Operations involving handling LLVM IR or bitcode (e.g. cross-language
+ LTO) require the same LLVM major version to work properly. For best
+ compatibility it is recommended that the exact same LLVM is used.
+
config ARCH_HAS_CC_CAN_LINK
bool
@@ -163,12 +178,6 @@ config LD_CAN_USE_KEEP_IN_OVERLAY
# https://github.com/llvm/llvm-project/pull/130661
def_bool LD_IS_BFD || LLD_VERSION >= 210000
-config RUSTC_HAS_SLICE_AS_FLATTENED
- def_bool RUSTC_VERSION >= 108000
-
-config RUSTC_HAS_COERCE_POINTEE
- def_bool RUSTC_VERSION >= 108400
-
config RUSTC_HAS_SPAN_FILE
def_bool RUSTC_VERSION >= 108800
@@ -2178,9 +2187,7 @@ config RUST
depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
select CFI_ICALL_NORMALIZE_INTEGERS if CFI
- depends on !CALL_PADDING || RUSTC_VERSION >= 108100
depends on !KASAN_SW_TAGS
- depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300
help
Enables Rust support in the kernel.
@@ -2204,12 +2211,7 @@ config RUSTC_VERSION_TEXT
config BINDGEN_VERSION_TEXT
string
depends on RUST
- # The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
- # (https://github.com/rust-lang/rust-bindgen/pull/2678) and 0.71.0
- # (https://github.com/rust-lang/rust-bindgen/pull/3040). It can be removed
- # when the minimum version is upgraded past the latter (0.69.1 and 0.71.1
- # both fixed the issue).
- default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)"
+ default "$(shell,$(BINDGEN) --version 2>/dev/null)"
#
# Place an empty function call at each tracepoint site. Can be