[Mlir-commits] [llvm] [mlir] [MLIR][CMake] Suppress -Wpass-failed warning (PR #160472)
Nikita Popov
llvmlistbot at llvm.org
Mon Sep 29 03:40:06 PDT 2025
================
@@ -110,6 +110,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
endif()
endif()
+# libstdc++15 makes use of an unroll pragma inside std::find_if(). This
+# produces a warning if clang fails to unroll the loop. As this pragma is
+# outside of our control, suppress the warning.
+check_cxx_compiler_flag("-Wno-pass-failed" CXX_SUPPORTS_WNO_PASS_FAILED)
+append_if(CXX_SUPPORTS_WNO_PASS_FAILED "-Wno-pass-failed" CMAKE_CXX_FLAGS)
----------------
nikic wrote:
I agree that this shouldn't really be MLIR specific, I've moved it into LLVM. I've also added a FIXME referencing the issue so we can reconsider disabling this warning once the specific interaction with libstdc++ is resolved.
https://github.com/llvm/llvm-project/pull/160472
More information about the Mlir-commits
mailing list