Page MenuHomePhabricator

[libc++] [libc++abi] Use C++20 standard.
ClosedPublic

Authored by curdeius on Wed, Nov 18, 2:32 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Restricted Project
Commits
rG3b625060fc91: [libc++] [libc++abi] Use C++20 standard.
Summary

This change is needed to use char8_t when building libc++.
Using the same standard in libc++abi for coherence.

See https://reviews.llvm.org/D91517.

Diff Detail

Event Timeline

curdeius created this revision.Wed, Nov 18, 2:32 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptWed, Nov 18, 2:32 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
curdeius requested review of this revision.Wed, Nov 18, 2:32 AM

I see at http://lab.llvm.org:8011/#/builders?tags=%2Blibcxx that there is at least one builder, http://lab.llvm.org:8011/#/builders/128, using gcc 5, that doesn't have -std=c++2a/20 flag. So using CXX_STANDARD_REQUIRED ON will fail there.
Should I set it to OFF?
Otherwise, only gcc 8+ accepts -std=c++2a...

In order to support older compilers (not accepting -std=c++2a, i.e. gcc < 8 and clang < 5), I think we should use CXX_STANDARD_REQUIRED OFF, so that it will fall back to c++17.

ldionne requested changes to this revision.Fri, Nov 20, 7:53 AM

In order to support older compilers (not accepting -std=c++2a, i.e. gcc < 8 and clang < 5), I think we should use CXX_STANDARD_REQUIRED OFF, so that it will fall back to c++17.

Okay, let's do that until we actually update our compiler requirements. I have a draft email I need to send, I'll try to do that sooner than later. Thanks for following up, Marek.

This revision now requires changes to proceed.Fri, Nov 20, 7:53 AM
curdeius updated this revision to Diff 306708.Fri, Nov 20, 8:52 AM
  • Make C++ standard non-required, so that compilers that do not accept -std=c++2a are pleased (gcc < 8).
ldionne accepted this revision.Fri, Nov 20, 11:40 AM

LGTM once CI passes. The failures looked flaky to me, I restarted the jobs.

This revision is now accepted and ready to land.Fri, Nov 20, 11:40 AM

Thanks Louis! The tests that fail seem indeed flaky (C++03: both failures in libcxx/test/libcxx/modules). Especially that the first time (before I changed required standard to OFF) everything passed just fine (and without restarts).
How can I restart a job?

Thanks Louis! The tests that fail seem indeed flaky (C++03: both failures in libcxx/test/libcxx/modules). Especially that the first time (before I changed required standard to OFF) everything passed just fine (and without restarts).
How can I restart a job?

You might need to be an admin in Buildkite.

I believe these jobs are flaky because they use modules, and there's something broken with module caches. @EricWF and I have been seeing these failures on and off for a while. It'd kind of disturbing.

This revision was landed with ongoing or failed builds.Sun, Nov 22, 6:57 AM
This revision was automatically updated to reflect the committed changes.