[llvm] [cmake] Fix detecting -Wno-pass-failed (PR #162835)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 10 05:19:54 PDT 2025
nikic wrote:
> This used to be how most warning options were detected in HandleLLVMOptions.cmake. However, in
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.
https://github.com/llvm/llvm-project/pull/162835
More information about the llvm-commits
mailing list