This is an archive of the discontinued LLVM Phabricator instance.

Bump minimum toolchain version
ClosedPublic

Authored by thieta on Apr 2 2022, 7:28 AM.

Diff Detail

Event Timeline

thieta created this revision.Apr 2 2022, 7:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2022, 7:28 AM
Herald added a subscriber: mgorny. · View Herald Transcript
thieta requested review of this revision.Apr 2 2022, 7:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2022, 7:28 AM

GCC X.1 / 2 releases tend to be quite buggy. Maybe 7.5 is better option?

cor3ntin accepted this revision.Apr 2 2022, 11:46 AM
cor3ntin added a subscriber: cor3ntin.

LGTM

This revision is now accepted and ready to land.Apr 2 2022, 11:46 AM
mehdi_amini accepted this revision.Apr 2 2022, 12:31 PM
tschuett added a subscriber: tschuett.EditedApr 2 2022, 12:38 PM

Do you want to say something about buildbots, C++ features, and that you are not committing until foo.

Did anyone actually try building LLVM with the "minimum required" compilers? I recall having problems with an old build config using clang 5 not too long ago...

I have a bot building with clang-5, and one building with gcc 5.x, but I’ll happily upgrade them to whatever is the new minimum

MaskRay accepted this revision.Apr 3 2022, 6:14 PM

GCC X.1 / 2 releases tend to be quite buggy. Maybe 7.5 is better option?

While that sounds nice - the versions in this change is the ones we have discussed in the RFC and the higher we bump versions the more people we are going to lock out - so I think we'll keep 7.1 for now and if we encounter specific breakages / bugs in that version we might update the document and suggest people use the latest 7.x version instead.

Do you want to say something about buildbots, C++ features, and that you are not committing until foo.

Here is the rough plan I am thinking right now and I will post in the forums soon:

  • Announcement in the forums that this is happening today or tomorrow.
  • Let's allow a week for buildbot owners to upgrade before we merge this commit. Maybe merge it end of this week or maybe beginning of next.
  • The soft error will live in main until we branch for LLVM 15.x
  • When that has been branched - we will convert it to a hard error in main and up the CXX_VERSION to 17.
  • LLVM 16.x will require the new toolchain and you will be allowed to use C++17 features.
thieta updated this revision to Diff 420108.Apr 4 2022, 12:00 AM

Added note about toolchain requirements to release notes

jhenderson accepted this revision.Apr 4 2022, 12:47 AM

LGTM, but:

Announcement in the forums that this is happening today or tomorrow.

I'd give it maybe a few more days than that (perhaps the end of the week or start of next), to ensure opportunity for those who have a bit of time off to chime in, in case they didn't see the original RFC/realise it had reached a conclusion.

LGTM, but:

Announcement in the forums that this is happening today or tomorrow.

I'd give it maybe a few more days than that (perhaps the end of the week or start of next), to ensure opportunity for those who have a bit of time off to chime in, in case they didn't see the original RFC/realise it had reached a conclusion.

Yeah I have no idea why I wrote today or tomorrow here when I was thinking end of this week or start of next one - as I wrote in the post in the forum as well. Must have been before my second cup of coffee. Good spot though!

thieta edited the summary of this revision. (Show Details)Apr 4 2022, 1:43 AM
jyknight added inline comments.Apr 4 2022, 2:37 PM
llvm/cmake/modules/CheckCompilerVersion.cmake
22

Replace this with set(LIBSTDCXX_SOFT_ERROR 7) and use per comment below.

99–100

As this change increments the minimum GCC version to 7, we should switch to using _GLIBCXX_RELEASE to check the libstdc++ version. This is better than using __GLIBCXX__ dates, because the dates are updated for every patch release on every branch, so it cannot actually distinguish between branches properly.

The hack of checking iostream_category can go away, as well (it was just a workaround for the unreliability of GLIBCXX).

So, the whole check below should be able to be simplified to:

#if defined(__GLIBCXX__)
#if !defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE < ${LIBSTDCXX_SOFT_ERROR}
#error Unsupported libstdc++ version
#endif
#endif
int main() { return 0; }
thieta updated this revision to Diff 420394.Apr 4 2022, 11:34 PM

Simpilify the libstdc++ check - as suggested by jyknight

thieta marked 2 inline comments as done.Apr 4 2022, 11:36 PM

@jyknight Addressed your comments - I did test it on my system to fudge the required versions a bit. But if someone have access to a GCC < 7.1 system it might be good to test it there. Otherwise I'll try to figure out how to test it in a docker container maybe.

Gentle Ping - I am planning to land this tomorrow, unless I get feedback to the opposite.

h-vetinari added inline comments.
llvm/cmake/modules/CheckCompilerVersion.cmake
108

Was this additional indent intentional? Shouldn't then the whole content of check_cxx_sources_compiles be indented?

thieta updated this revision to Diff 421141.Apr 7 2022, 2:38 AM

Fixed un-intentional indent.

thieta marked an inline comment as done.Apr 7 2022, 2:39 AM
thieta added inline comments.
llvm/cmake/modules/CheckCompilerVersion.cmake
108

that was not intentional no - probably my editor doing something funny. Thanks for spotting that.

thieta marked an inline comment as done.Apr 7 2022, 2:39 AM
jyknight accepted this revision.Apr 7 2022, 7:55 AM

LG, just some minor comments.

llvm/cmake/modules/CheckCompilerVersion.cmake
99–100

Delete the comment; it's now incorrect, and no longer necessary since the test is now obvious.
Delete unnecessary #include <iosfwd>.

thieta added inline comments.Apr 7 2022, 8:26 AM
llvm/cmake/modules/CheckCompilerVersion.cmake
99–100

iosfwd was needed in order for _GLIBCXX_RELEASE to be defined - maybe we could include a smaller header to get that define - but I couldn't delete it.

thieta updated this revision to Diff 421230.Apr 7 2022, 8:33 AM

Removed unnecessary comment.

This revision was landed with ongoing or failed builds.Apr 8 2022, 12:05 AM
This revision was automatically updated to reflect the committed changes.