Page MenuHomePhabricator

Fix libc++'s lit configuration language dialect inference for GCC 5 and GCC 6
ClosedPublic

Authored by wash on Jun 4 2019, 12:56 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

wash created this revision.Jun 4 2019, 12:56 PM
ldionne accepted this revision.Jun 4 2019, 1:15 PM

I'm okay with this (I don't care much about GCC), but I want to point out you're basically reducing the usefulness of the test suite on GCC 5/6 by just wholesale removing all C++17 tests, when GCC5/6 can actually run a large subset of the tests.

I think this is still better than adding a bunch of complexity to disable tests in a finer-grained manner.

Do you have commit access?

This revision is now accepted and ready to land.Jun 4 2019, 1:15 PM

I'm okay with this (I don't care much about GCC), but I want to point out you're basically reducing the usefulness of the test suite on GCC 5/6 by just wholesale removing all C++17 tests, when GCC5/6 can actually run a large subset of the tests.

I see your point, but I think it was always the intention to disable these tests universally for GCC < 7 (thus the removal of -std=c++1z). Also, we do the same thing for C++14 tests for GCC5 - none of them run for GCC < 6.

The C++17 language support chart for GCC is pretty sparse until GCC 7.

I thought about going through the failures individually, but there's about 150 with GCC 5.

I think this is still better than adding a bunch of complexity to disable tests in a finer-grained manner.

Agreed.

Do you have commit access?

Probably not.

Should I commit this? @wash

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2019, 9:24 AM