[llvm] [cmake] Fix detecting -Wno-pass-failed (PR #162835)
    Martin Storsjö via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Oct 10 05:20:48 PDT 2025
    
    
  
mstorsjo wrote:
> > This used to be how most warning options were detected in HandleLLVMOptions.cmake. However, in
> > [4feae05](https://github.com/llvm/llvm-project/commit/4feae05c6abda364a9295aecfa600d7d4e7dfeb6), many of these checks were rewritten to avoid trying compilation and just relying on hardcoded knowledge about which compilers and versions thereof support which warnings, to speed up the cmake configuration.
> 
> Let's just do that instead. It looks like `-Wpass-failed` exists since Clang 3.5: https://clang.godbolt.org/z/1b879PTr8 And out minimum toolchain requirement is Clang 5.0. So I think we should just guard this by `if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")` and skip the compiler invocation.
That sounds good to me as well - I'll update this PR with that change instead.
https://github.com/llvm/llvm-project/pull/162835
    
    
More information about the llvm-commits
mailing list