[llvm-dev] Using C++14 code in LLVM

Zachary Turner via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 31 14:56:04 PDT 2017


On Tue, Oct 31, 2017 at 2:45 PM Justin Bogner <mail at justinbogner.com> wrote:

> Zachary Turner via llvm-dev <llvm-dev at lists.llvm.org> writes:
> >
> > Issue: If we're going to make people bootstrap a compiler, we might as
> well
> > go all the way to C++17.
> > Comment: I'm not opposed.
>
> We shouldn't make people bootstrap the compiler without a very good
> reason. I really don't want to be in the situation where you have to get
> clang 3.7 to bootstrap 5.0 to bootstrap 7.0 to bootstrap 9.0 in 2019.
>

Why would this many hops ever be necessary?  System Compiler -> {Clang 5 or
GCC 7} -> Clang ToT should be sufficient to last until C++23, which we
probably wouldn't adopt until 2025-2030 anyway


>
> > * Clang 6 supports all of C++20, and it builds with only C++11, so we
> > shouldn't have to worry too much about the problem of needing to "daisy
> > chain" compilers to finally get the latest version of LLVM building.
> "GCC
> > 4.8 -> Clang 6 - > Clang ToT" should hold up through C++1z.
>
> I don't understand how this argument holds. If we change the minimum c++
> standard we build with every time one comes out, we'll definitely have a
> long daisy chain of compilers that need to be built to start working on
> LLVM at all.
>
Clang 6 supports all of C++20.  If we started requiring C++14 today,
someone can build Clang 6 with the system compiler and then build Clang ToT.

If 3 months later we started requiring C++17, someone could build clang 6
with the system compiler and then build Clang ToT.

If 3 months later we started requiring C++20, someone could still build
clang 6 with the system compiler and then build Clang ToT.

Every relaxation of the kind of code we can use in LLVM does not
necessitate an extra hop in the bootstrapping process, because existing
versions of clang can already compile through C++20.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171031/7598cd9f/attachment.html>


More information about the llvm-dev mailing list