[libc++][PSTL] Disable `-Wpass-failed`.
authorKonstantin Varlamov <varconsteq@gmail.com>
Fri, 4 Aug 2023 22:11:31 +0000 (15:11 -0700)
committerTobias Hieta <tobias@hieta.se>
Mon, 21 Aug 2023 07:51:54 +0000 (09:51 +0200)
PSTL contains many pragmas that request loop vectorization, which would
produce a warning when the compiler is unable to fulfill the request (if
`-Wpass-failed` is enabled). This is normal and expected in some cases,
and we don't want `-Werror` to turn that into a compilation failure.

Differential Revision: https://reviews.llvm.org/D157145

(cherry picked from commit 1d340250a894b6ec956e2145b2fc7babbf83e61b)

libcxx/utils/libcxx/test/params.py

index 2e14a64185c7c67a633f247536f3542b43624cc8..f43c634a1644fc35c25705c4f968027d57d9fea7 100644 (file)
@@ -51,6 +51,10 @@ _warningFlags = [
     # Disable warnings for extensions used in C++03
     "-Wno-local-type-template-args",
     "-Wno-c++11-extensions",
+
+    # Don't fail compilation in case the compiler fails to perform the requested
+    # loop vectorization.
+    "-Wno-pass-failed",
 ]
 
 _allStandards = ["c++03", "c++11", "c++14", "c++17", "c++20", "c++23", "c++26"]