This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Require a C++20 capable compiler.
ClosedPublic

Authored by ldionne on Sep 23 2021, 8:50 AM.

Details

Reviewers
Mordante
Group Reviewers
Restricted Project
Commits
rGf881776175e9: [libc++] Require a C++20 capable compiler.
Summary

This enforces libcxx and its benchmarks are compiled by a C++20 capable
compiler. Based on review comments in D103413.

Diff Detail

Event Timeline

Mordante created this revision.Sep 23 2021, 8:50 AM
Mordante requested review of this revision.Sep 23 2021, 8:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2021, 8:50 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Sep 23 2021, 8:51 AM
This revision is now accepted and ready to land.Sep 23 2021, 8:51 AM
ldionne commandeered this revision.Sep 23 2021, 9:17 AM
ldionne edited reviewers, added: Mordante; removed: ldionne.

Commandeering to rebase on top of my D110285, which conflicts with this.

This revision now requires review to proceed.Sep 23 2021, 9:17 AM
ldionne updated this revision to Diff 374582.Sep 23 2021, 9:18 AM

Rebase onto main

This revision was not accepted when it landed; it landed in state Needs Review.Sep 24 2021, 8:38 AM
This revision was automatically updated to reflect the committed changes.
saghir added a subscriber: saghir.Sep 25 2021, 11:20 AM

This seems to be breaking one of PPC buildbots: https://lab.llvm.org/buildbot/#/builders/18/builds/2553/steps/7/logs/stdio
Can you please take a look when you get a chance?

Thanks!

This seems to be breaking one of PPC buildbots: https://lab.llvm.org/buildbot/#/builders/18/builds/2553/steps/7/logs/stdio
Can you please take a look when you get a chance?

Thanks!

Looking at the log I see a no longer supported combination -DLLVM_ENABLE_PROJECTS='\''clang;compiler-rt;libcxx;libcxxabi'\''' and GCC 7.3.1. Libc++ requires a C++20 capable compiler. Instead of using GCC directly it's possible to use a bootstrap build. Using
DLLVM_ENABLE_PROJECTS='clang;compiler-rt' -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' should fix your issue. See https://libcxx.llvm.org/BuildingLibcxx.html#bootstrapping-build for more information. Please let us know when you need more information.

carlosgalvezp added a subscriber: carlosgalvezp.EditedSep 28 2021, 4:24 AM

Hi @Idionne @Mordante !

I believe this commit broke the whole delivery pipeline of .deb bionic-snapshot packages:

https://llvm-jenkins.debian.net/job/llvm-toolchain-bionic-binaries/architecture=amd64,distribution=bionic,label=amd64/2228/console

CMake Error in /build/llvm-toolchain-snapshot-14~++20210926063815+c4ae4a745dbd/libcxx/benchmarks/CMakeLists.txt:
  The compiler feature "cxx_std_20" is not known to CXX compiler

  "GNU"

  version 7.3.0.

Would it be possible to revert/fix? Currently we cannot get new fixes to trunk as deb packages since the pipeline is broken.

Hi @Idionne @Mordante !

I believe this commit broke the whole delivery pipeline of .deb bionic-snapshot packages:

Can you try whether you can use the -DLLVM_ENABLE_RUNTIMES solution works for you?
(See the post before yours)

Hi @Idionne @Mordante !

I believe this commit broke the whole delivery pipeline of .deb bionic-snapshot packages:

Can you try whether you can use the -DLLVM_ENABLE_RUNTIMES solution works for you?
(See the post before yours)

Unfortunately I'm not in control of that build pipeline, I thought this was the correct place to report these issues. I'll see if I find the right place and forward your tips there, thanks!

Hi @Idionne @Mordante !

I believe this commit broke the whole delivery pipeline of .deb bionic-snapshot packages:

Can you try whether you can use the -DLLVM_ENABLE_RUNTIMES solution works for you?
(See the post before yours)

Unfortunately I'm not in control of that build pipeline, I thought this was the correct place to report these issues. I'll see if I find the right place and forward your tips there, thanks

No problem, since you reported it I thought you were also in control of the pipeline.
@sylvestre.ledru can you look at using -DLLVM_ENABLE_RUNTIMES for the Debian/Ubuntu nightly builds.
If you have questions feel free to leave a message in the libcxx Discord channel.

Yeah, it is ongoing work but it will take a few more days/weeks
here is the work:
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/merge_requests/73

GCC 7.3 has been unsupported since the LLVM 12 release, see the discussion started at https://lists.llvm.org/pipermail/llvm-dev/2021-March/148881.html. Please use https://libcxx.llvm.org/BuildingLibcxx.html#bootstrapping-build as @Mordante suggested -- it will also result in a working libc++ as opposed to a maybe-working-libc++-but-nobody-has-tested-that-for-years.

If you need some more time to fix this on your end, please apply a revert locally, but reverting upstream is not an option at this point.

Yeah, it is ongoing work but it will take a few more days/weeks
here is the work:
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/merge_requests/73

Just for my understanding, is this work only for branch "12" or will it also apply to "snapshot"?

12 will be merged into 13 and then snapshot :)

For the release notes:
https://reviews.llvm.org/D111043

Which version of gcc are supported btw?

We support the latest release of GCC, at the moment GCC 11.
This is a link to libc++'s platform support https://libcxx.llvm.org/#platform-and-compiler-support