[llvm-dev] A Short Policy Proposal Regarding Host Compilers

Adrien Guinet via llvm-dev llvm-dev at lists.llvm.org
Fri May 11 07:28:15 PDT 2018


On 05/11/2018 03:37 PM, Keane, Erich via llvm-dev wrote:
> Hi All-
> As we all know, the C++14 discussion is flaring up again.  Chandler brought up that he would like a concrete plan to switch.  In my opinion, this is insufficient, as it will result in us simply having this discussion AGAIN next release.  Instead, I would prefer us to have a concrete Policy on our host compilers.  That way, changes like this are unsurprising to our users, and advance our codebase sufficiently.  I believe the arguments for/against upgrading have been made repeatedly, so I won't repeat them here.  My proposal is thus:
> 
> Starting with the Clang 7.0 release, we will officially support any major release of our host compilers (MSVC, GCC, Clang, ?ICC?) released in the past 3* years from our previous branch date to give trunk-developers time to transition (so for 7.0, 3 years before January 3, 2018).  This will be enforced via the CMake CheckCompilerVersion script (ala https://reviews.llvm.org/D46723).  ADDITIONALLY, a CMake warning will be issued for any major release less than 1.5* years old to give our users sufficient time to transition/upgrade their compilers.  Finally, our dependent C++ version will be the best released standard officially supported by the collection of compilers (for example, we'd support -C++20 if all compilers had std=c++20 or eqiv, but NOT std=c++2a).  
> 
> The 3-years/1.5 years would result in our minimum GCC/Clang becoming: GCC5.1/Clang3.6.  We would WARN on anything older than GCC7.1/Clang3.8
> 
> /End Proposal
> 
> 
> *: To Be Bikeshed

One thing to consider (and, as far as I understand, is one of the main
issue) is that you can have an up-to-date compiler using an old C++
standard library. One example would be to install Clang 6 in Debian
jessie (using i.e. http://apt.llvm.org/jessie/). libstdc++ is the one of
GCC 4.9 in this system, and I think their would be issues in this case
compiling C++14 code.

The idea would be to also add checks for the version of the standard C++
library that is used to compile LLVM. It is maybe also possible to use
an up-to-date libc++ and statically compile LLVM with it, but I've never
tried it thought.

-- 
Adrien.


More information about the llvm-dev mailing list