Skip to content

Commit f203d44

Browse files
committed
Move to llvm, add FIXME to possibly remove it again
1 parent 1e2a487 commit f203d44

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,13 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
962962

963963
# Enable -Wctad-maybe-unsupported to catch unintended use of CTAD.
964964
add_flag_if_supported("-Wctad-maybe-unsupported" CTAD_MAYBE_UNSPPORTED_FLAG)
965+
966+
# Disable -Wno-pass-failed flag, which reports failure to perform
967+
# optimizations suggested by pragmas. This warning is not relevant for LLVM
968+
# projects and may be injected by pragmas in libstdc++.
969+
# FIXME: Reconsider this choice if warnings from STL headers can be reliably
970+
# avoided (https://github.com/llvm/llvm-project/issues/157666).
971+
add_flag_if_supported("-Wno-pass-failed" NO_PASS_FAILED_FLAG)
965972
endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
966973

967974
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)

mlir/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
110110
endif()
111111
endif()
112112

113-
# libstdc++15 makes use of an unroll pragma inside std::find_if(). This
114-
# produces a warning if clang fails to unroll the loop. As this pragma is
115-
# outside of our control, suppress the warning.
116-
check_cxx_compiler_flag("-Wno-pass-failed" CXX_SUPPORTS_WNO_PASS_FAILED)
117-
append_if(CXX_SUPPORTS_WNO_PASS_FAILED "-Wno-pass-failed" CMAKE_CXX_FLAGS)
118-
119113
# Installing the headers and docs needs to depend on generating any public
120114
# tablegen'd targets.
121115
# mlir-generic-headers are dialect-independent.

0 commit comments

Comments
 (0)