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.

lib/Kconfig.debug: Require a release version of LLVM 22 for context analysis

Using a prerelease version as a minimum supported version for
CONFIG_WARN_CONTEXT_ANALYSIS was reasonable to do while LLVM 22 was the
development version so that people could immediately build from main and
start testing and validating this in their own code. However, it can be
problematic when using prerelease versions of LLVM 22, such as Android
clang 22.0.1 (the current android mainline compiler) or when bisecting
LLVM between llvmorg-22-init and llvmorg-23-init, to build the kernel,
as all compiler fixes for the context analysis may not be present,
potentially resulting in warnings that can easily turn into errors.

Now that LLVM 22 is released as 22.1.0, upgrade the check to require at
least this version to ensure that a user's toolchain actually has all
the changes needed for a smooth experience with context analysis.

Fixes: 3269701cb256 ("compiler-context-analysis: Add infrastructure for Context Analysis with Clang")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Marco Elver <elver@google.com>
Link: https://patch.msgid.link/20260224-bump-clang-ver-context-analysis-v1-1-16cc7a90a040@kernel.org

authored by

Nathan Chancellor and committed by
Peter Zijlstra
ab6088e7 6de23f81

+2 -2
+2 -2
lib/Kconfig.debug
··· 630 630 631 631 config WARN_CONTEXT_ANALYSIS 632 632 bool "Compiler context-analysis warnings" 633 - depends on CC_IS_CLANG && CLANG_VERSION >= 220000 633 + depends on CC_IS_CLANG && CLANG_VERSION >= 220100 634 634 # Branch profiling re-defines "if", which messes with the compiler's 635 635 # ability to analyze __cond_acquires(..), resulting in false positives. 636 636 depends on !TRACE_BRANCH_PROFILING ··· 641 641 and releasing user-definable "context locks". 642 642 643 643 Clang's name of the feature is "Thread Safety Analysis". Requires 644 - Clang 22 or later. 644 + Clang 22.1.0 or later. 645 645 646 646 Produces warnings by default. Select CONFIG_WERROR if you wish to 647 647 turn these warnings into errors.