[libcxx-commits] [libcxx] r366700 - [libc++] Do not infer support for C++17 in GCC < 7

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 22 09:24:48 PDT 2019


Author: ldionne
Date: Mon Jul 22 09:24:48 2019
New Revision: 366700

URL: http://llvm.org/viewvc/llvm-project?rev=366700&view=rev
Log:
[libc++] Do not infer support for C++17 in GCC < 7

libc++'s lit configuration infers the C++ language dialect when it is
not provided by checking which -std= flags that a compiler supports.
GCC 5 and GCC 6 have a -std=c++17 flag, however, they do not have full
C++17 support. The lit configuration has hardcoded logic that removes
-std=c++1z as an option to test for GCC < 7, but not -std=c++17.

This leads to a bunch of failures when running libc++ tests with GCC 5
or GCC 6. This patch adds -std=c++17 to the list of flags that are
discarded for GCC < 7 by lit's language dialect inference.

Thanks to Bryce Adelstein Lelbach for the patch.

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

Modified:
    libcxx/trunk/utils/libcxx/test/config.py

Modified: libcxx/trunk/utils/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=366700&r1=366699&r2=366700&view=diff
==============================================================================
--- libcxx/trunk/utils/libcxx/test/config.py (original)
+++ libcxx/trunk/utils/libcxx/test/config.py Mon Jul 22 09:24:48 2019
@@ -524,6 +524,7 @@ class Configuration(object):
                 maj_v = int(maj_v)
                 if maj_v < 7:
                     possible_stds.remove('c++1z')
+                    possible_stds.remove('c++17')
                 # FIXME: How many C++14 tests actually fail under GCC 5 and 6?
                 # Should we XFAIL them individually instead?
                 if maj_v <= 6:




More information about the libcxx-commits mailing list