This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Divorce the std Lit feature from the -std=XXX compiler flag
ClosedPublic

Authored by ldionne on Apr 9 2021, 8:45 AM.

Details

Summary

After this patch, we can use --param std=c++20 even if the compiler only
supports -std=c++2a. The test suite will handle that for us. The only Lit
feature that isn't fully baked will always be the "in development" one,
since we don't know exactly what year the standard will be ratified in.

This is another take on https://reviews.llvm.org/D99789.

Diff Detail

Event Timeline

ldionne created this revision.Apr 9 2021, 8:45 AM
ldionne requested review of this revision.Apr 9 2021, 8:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2021, 8:45 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
curdeius accepted this revision as: curdeius.Apr 9 2021, 9:25 AM

It's fine with me. I don't mind switching from 2a to 20.

Quuxplusone added inline comments.
libcxx/utils/libcxx/test/params.py
50

if std in fallbacks and
should fix the build errors.

ldionne updated this revision to Diff 336506.Apr 9 2021, 10:01 AM

Fix CI failure - thanks Arthur!

This feels simpler than D99789, so OK.
(Somehow wc -l thinks D99789 is simpler, but whatever. This one also updates Generic-cxx20.cmake, which is a good thing.)

ldionne accepted this revision as: Restricted Project.Apr 9 2021, 1:02 PM

I'll land this once CI is green. Thanks!

This revision is now accepted and ready to land.Apr 9 2021, 1:02 PM