This is an archive of the discontinued LLVM Phabricator instance.

Require GCC 5.1 and LLVM 3.5 at a minimum
AbandonedPublic

Authored by jfb on May 10 2018, 1:25 PM.

Details

Reviewers
None
Summary

As discussed in: http://lists.llvm.org/pipermail/llvm-dev/2018-May/123182.html

Let's start migrating to C++14:

  1. Update the GCC and LLVM versions to the ones that first got full C++14 support
  2. See if bots fall over and die, fix them
  3. Update the rest of this file (MSVC and standard libraries)
  4. Discuss next steps to move to -std=c++14 (it'll cause churn as we fix things)
  5. Update various LLVM idioms one at a time to C++14

Diff Detail

Event Timeline

jfb created this revision.May 10 2018, 1:25 PM
bcain added a subscriber: bcain.May 10 2018, 1:29 PM
lebedev.ri added inline comments.May 10 2018, 1:33 PM
cmake/modules/CheckCompilerVersion.cmake
15–17

I think you want clang 3.5+
https://godbolt.org/g/yq25fe

jfb added inline comments.May 10 2018, 1:36 PM
cmake/modules/CheckCompilerVersion.cmake
15–17

I'm not sure: according to http://en.cppreference.com/w/cpp/compiler_support#cpp14 we're OK with 3.4. It's OK to use c++1y for 3.4 if it has all of C++14 and isn't buggy.

Additionally, IMO, I'd think we would be better off specifying Clang 3.5. Being able to specify c++14 vs c++1y seems worth the minor inconvenience unless there is a platform we care about that ships 3.4. FWIW, 5.1 supports c++14.

cmake/modules/CheckCompilerVersion.cmake
11–12

If I recall correctly, 5.0 never existed as an official release. 5.0 would be GCC's development channel, so we likely want to specify 5.1 instead, right?

Prazek added a subscriber: Prazek.May 10 2018, 1:55 PM

I think you also need to change GettingStarted doc

jfb updated this revision to Diff 146237.May 10 2018, 3:01 PM

GCC 5.1 / LLVM 3.5; update docs

jfb edited the summary of this revision. (Show Details)May 10 2018, 3:02 PM
jfb marked 3 inline comments as done.May 10 2018, 3:03 PM
jfb added inline comments.
docs/GettingStarted.rst
365

Can someone with easy Linux access confirm that this works? I got the URLs, but can't make sure it all works at the moment.

jfb retitled this revision from Require GCC 5.0 and LLVM 3.4 at a minimum to Require GCC 5.1 and LLVM 3.5 at a minimum.May 10 2018, 3:44 PM
labath added a subscriber: labath.May 11 2018, 1:25 AM

We might need to play with _GLIBCXX_USE_CXX11_ABI=0 and the -Wabi-tag option to mitigate libstdc++ ABI issues.

jfb added a comment.May 11 2018, 9:18 AM

We might need to play with _GLIBCXX_USE_CXX11_ABI=0 and the -Wabi-tag option to mitigate libstdc++ ABI issues.

Agreed. Do you have a Linux machine to try it out? I don't have a VM set up with an older distro at the moment. It would be useful to see which libstdc++ features are used by LLVM when compiled with GCC 5.1 (as well as with LLVM 3.4 when using libstdc++).

In D46723#1096058, @jfb wrote:

We might need to play with _GLIBCXX_USE_CXX11_ABI=0 and the -Wabi-tag option to mitigate libstdc++ ABI issues.

Agreed. Do you have a Linux machine to try it out? I don't have a VM set up with an older distro at the moment. It would be useful to see which libstdc++ features are used by LLVM when compiled with GCC 5.1 (as well as with LLVM 3.4 when using libstdc++).

I have a machine with Ubuntu 14.04. I'll run experiments.

In D46723#1096058, @jfb wrote:

We might need to play with _GLIBCXX_USE_CXX11_ABI=0 and the -Wabi-tag option to mitigate libstdc++ ABI issues.

Agreed. Do you have a Linux machine to try it out? I don't have a VM set up with an older distro at the moment. It would be useful to see which libstdc++ features are used by LLVM when compiled with GCC 5.1 (as well as with LLVM 3.4 when using libstdc++).

I have a machine with Ubuntu 14.04. I'll run experiments.

I ran experiments. I installed gcc 5 from ppa:ubuntu-toolchain-r/test on Ubuntu 14.04. It was gcc 5.5. It updated the system libstdc++ to GLIBCXX_3.4.21. Clang/LLVM built with it won't run on clean Ubuntu 14.04. The library is built with the old library ABI.
The option '-Wabi-tag' did not provide any information because no ABI tags are used in the library header files. The option works for gcc on Ubuntu 16.04. With it enabled I managed to find 2069 places having library ABI issues (2041 - string; 28 - list).

jfb abandoned this revision.May 18 2018, 9:41 AM

I quite like the approach in D47073. I'll defer to it.