Switching swift to C++14

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto`
return types without trailing type information). Joe mentioned that there
was some interest in switching the rest of swift to C++14 as well. I
figured that I would just start a thread here to determine if this is okay
to do globally rather than just specifically for the Windows builds to
ensure that we can build the Windows components.

Thanks.

···

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

···

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

The current Ubuntu LTS (16.04) has clang 4 which supports C++14. libstdc++ claims C++14 compliance in the 4.9 release. That is available in Xenial (16.04) as well. So, I believe that the dependency issue should not be a problem.

···

On Dec 13, 2017, at 1:45 PM, Jordan Rose <jordan_rose@apple.com> wrote:

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

···

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

We're talking minimal requirements, not current versions. Otherwise this becomes a "should we drop support for X" thread, which is a different proposition.

Jordan

···

On Dec 13, 2017, at 14:19, Saleem Abdulrasool <compnerd@compnerd.org> wrote:

On Dec 13, 2017, at 1:45 PM, Jordan Rose <jordan_rose@apple.com> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

The current Ubuntu LTS (16.04) has clang 4 which supports C++14. libstdc++ claims C++14 compliance in the 4.9 release. That is available in Xenial (16.04) as well. So, I believe that the dependency issue should not be a problem.

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

···

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

The current Ubuntu LTS (16.04) has clang 4 which supports C++14. libstdc++ claims C++14 compliance in the 4.9 release. That is available in Xenial (16.04) as well. So, I believe that the dependency issue should not be a problem.

We're talking minimal requirements, not current versions. Otherwise this becomes a "should we drop support for X" thread, which is a different proposition.

I was trying to clarify that the minimum requirements for C++14 would not be a problem with the current minimum system requirements for Linux.

···

On Dec 13, 2017, at 2:30 PM, Jordan Rose <jordan_rose@apple.com> wrote:

On Dec 13, 2017, at 14:19, Saleem Abdulrasool <compnerd@compnerd.org> wrote:

On Dec 13, 2017, at 1:45 PM, Jordan Rose <jordan_rose@apple.com> wrote:

Jordan

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

···

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

···

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, wrote:

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

> On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:
>
> Daniel,
>
> When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.
>
> Thanks,
> Ted
>
> > On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:
> >
> > FWIW, llbuild requires C++14.
> >
> > We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.
> >
> > - Daniel
> >
> > > On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:
> > >
> > > No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?
> > >
> > > The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.
> > >
> > > Jordan
> > >
> > >
> > > > On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.
> > > >
> > > > Thanks.
> > > >
> > > > --
> > > > Saleem Abdulrasool
> > > > compnerd (at) compnerd (dot) org
> > > > _______________________________________________
> > > > swift-dev mailing list
> > > > swift-dev@swift.org
> > > > https://lists.swift.org/mailman/listinfo/swift-dev
> > >
> > > _______________________________________________
> > > swift-lldb-dev mailing list
> > > swift-lldb-dev@swift.org
> > > https://lists.swift.org/mailman/listinfo/swift-lldb-dev
> >
> > _______________________________________________
> > swift-lldb-dev mailing list
> > swift-lldb-dev@swift.org
> > https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

- Daniel

···

On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, wrote:

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself.

I am still hoping that one day we could retire build-script and just throw swift into llvm/tools, so it can be built in parallel with llvm and clang by the same ninja invocation. Building swift with the just-built clang would move us further away from that goal (but this is just my personal vision of how things should be built).
-- adrian

···

On Dec 19, 2017, at 2:31 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com> wrote:

By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, wrote:

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

1 Like

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

Interesting. Was that not a concern when that choice was made for llbuild, or was the context different?

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

That’s a significant change to make just to get C++14 support guaranteed, and (I believe) would have a non-trivial impact on those using development environments that expect to use the Clang bundled with them to build projects.

···

On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com> wrote:

On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com <mailto:kremenek@apple.com>> wrote:

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>, wrote:

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com <mailto:kremenek@apple.com>> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

Interesting. Was that not a concern when that choice was made for llbuild, or was the context different?

The context was different, primarily. My personal expectation was that C++14 support would be generally available by the time we needed it on other platforms, or if not we would undertake the cost of reverting to C++11 at the time it was needed.

- Daniel

···

On Dec 19, 2017, at 3:59 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>> wrote:

On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com <mailto:kremenek@apple.com>> wrote:

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

That’s a significant change to make just to get C++14 support guaranteed, and (I believe) would have a non-trivial impact on those using development environments that expect to use the Clang bundled with them to build projects.

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>, wrote:

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com <mailto:kremenek@apple.com>> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

Interesting. Was that not a concern when that choice was made for llbuild, or was the context different?

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

That’s a significant change to make just to get C++14 support guaranteed, and (I believe) would have a non-trivial impact on those using development environments that expect to use the Clang bundled with them to build projects.

Agreed. However, the current supported platforms already support this minimum. I think that future platforms will need to provide that anyways. If the system doesn’t have a modern toolchain available, I suspect that it already would not have C++11 available either. In such a scenario, they need to provide a newer toolchain, and so the difference there is minimal as we already require C++11.

···

On Dec 19, 2017, at 3:59 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>> wrote:

On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com <mailto:kremenek@apple.com>> wrote:

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>>, wrote:

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com <mailto:kremenek@apple.com>> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

You can build that way if you want, although it doesn’t build “out of the box” without a few Swift specific build flags passed to cmake.

Dave

···

On Dec 19, 2017, at 17:44, Adrian Prantl via swift-dev <swift-dev@swift.org> wrote:

I am still hoping that one day we could retire build-script and just throw swift into llvm/tools, so it can be built in parallel with llvm and clang by the same ninja invocation.

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

Interesting. Was that not a concern when that choice was made for llbuild, or was the context different?

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

That’s a significant change to make just to get C++14 support guaranteed, and (I believe) would have a non-trivial impact on those using development environments that expect to use the Clang bundled with them to build projects.

Agreed. However, the current supported platforms already support this minimum. I think that future platforms will need to provide that anyways. If the system doesn’t have a modern toolchain available, I suspect that it already would not have C++11 available either. In such a scenario, they need to provide a newer toolchain, and so the difference there is minimal as we already require C++11.

OK, I’m convinced.

I want to hold off for a tiny bit just to see if anyone else has any commentary on this thread before we make a change.

···

On Dec 19, 2017, at 5:08 PM, Saleem Abdulrasool <compnerd@compnerd.org> wrote:

On Dec 19, 2017, at 3:59 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com> wrote:
On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com> wrote:

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, wrote:
It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

>
>
> >
> >
> >
> > >
> > >
> > >
> > > >
> > > > Fair enough.
> > > >
> > > > We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.
> > >
> > > It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.
> >
> > Interesting. Was that not a concern when that choice was made for llbuild, or was the context different?
> >
> > >
> > > I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.
> >
> > That’s a significant change to make just to get C++14 support guaranteed, and (I believe) would have a non-trivial impact on those using development environments that expect to use the Clang bundled with them to build projects.
>
> Agreed. However, the current supported platforms already support this minimum. I think that future platforms will need to provide that anyways. If the system doesn’t have a modern toolchain available, I suspect that it already would not have C++11 available either. In such a scenario, they need to provide a newer toolchain, and so the difference there is minimal as we already require C++11.

OK, I’m convinced.

I want to hold off for a tiny bit just to see if anyone else has any commentary on this thread before we make a change.

We’d also need to make this change on the LLDB side, and I realize now that a few people I’d like to weigh in are on vacation until the holidays. How about we pick this up immediately in the new year once it’s clear everyone that should weigh in has had a chance to do so.

···

On Dec 19, 2017, 8:33 PM -0800, Ted Kremenek via swift-dev <swift-dev@swift.org>, wrote:

On Dec 19, 2017, at 5:08 PM, Saleem Abdulrasool <compnerd@compnerd.org> wrote:
> > On Dec 19, 2017, at 3:59 PM, Ted Kremenek <kremenek@apple.com> wrote:
> > > On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com> wrote:
> > > > On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com> wrote:

>
> > >
> > > - Daniel
> > >
> > > >
> > > > On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, wrote:
> > > > > It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).
> > > > >
> > > > > - Daniel
> > > > >
> > > > > > On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:
> > > > > >
> > > > > > Daniel,
> > > > > >
> > > > > > When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.
> > > > > >
> > > > > > Thanks,
> > > > > > Ted
> > > > > >
> > > > > > > On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:
> > > > > > >
> > > > > > > FWIW, llbuild requires C++14.
> > > > > > >
> > > > > > > We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.
> > > > > > >
> > > > > > > - Daniel
> > > > > > >
> > > > > > > > On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:
> > > > > > > >
> > > > > > > > No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?
> > > > > > > >
> > > > > > > > The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.
> > > > > > > >
> > > > > > > > Jordan
> > > > > > > >
> > > > > > > >
> > > > > > > > > On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:
> > > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.
> > > > > > > > >
> > > > > > > > > Thanks.
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Saleem Abdulrasool
> > > > > > > > > compnerd (at) compnerd (dot) org
> > > > > > > > > _______________________________________________
> > > > > > > > > swift-dev mailing list
> > > > > > > > > swift-dev@swift.org
> > > > > > > > > https://lists.swift.org/mailman/listinfo/swift-dev
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > swift-lldb-dev mailing list
> > > > > > > > swift-lldb-dev@swift.org
> > > > > > > > https://lists.swift.org/mailman/listinfo/swift-lldb-dev
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > swift-lldb-dev mailing list
> > > > > > > swift-lldb-dev@swift.org
> > > > > > > https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Fair enough.

We care about swiftc and llbuild building a variety of platforms today —
FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally
supported by both (a) the mininum versions of the distributions we support
today and (b) the current versions of the platforms we’d like to expand
Swift to in the future. Does that sound right? I suspect you went through
the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what
platforms supported C++14.

Interesting. Was that not a concern when that choice was made for
llbuild, or was the context different?

I do think that we could always use the Clang++ we build as part of Swift
to build Swift itself. By that logic, it seems reasonable to expect we
could always have C++14 support, although it does mean that porters would
need modern Clang to support their platform. However, that is likely
largely a prerequisite for Swift to work as well.

That’s a significant change to make just to get C++14 support guaranteed,
and (I believe) would have a non-trivial impact on those using development
environments that expect to use the Clang bundled with them to build
projects.

Agreed. However, the current supported platforms already support this
minimum. I think that future platforms will need to provide that anyways.
If the system doesn’t have a modern toolchain available, I suspect that it
already would not have C++11 available either. In such a scenario, they
need to provide a newer toolchain, and so the difference there is minimal
as we already require C++11.

OK, I’m convinced.

I want to hold off for a tiny bit just to see if anyone else has any
commentary on this thread before we make a change.

We’d also need to make this change on the LLDB side, and I realize now
that a few people I’d like to weigh in are on vacation until the holidays.
How about we pick this up immediately in the new year once it’s clear
everyone that should weigh in has had a chance to do so.

Just a post-holiday bump to bring this back up :-). I'd like to get this
merged so that the other Windows stuff is unblocked.

···

On Wed, Dec 20, 2017 at 4:26 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, 8:33 PM -0800, Ted Kremenek via swift-dev < > swift-dev@swift.org>, wrote:
On Dec 19, 2017, at 5:08 PM, Saleem Abdulrasool <compnerd@compnerd.org> > wrote:
On Dec 19, 2017, at 3:59 PM, Ted Kremenek <kremenek@apple.com> wrote:
On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com> > wrote:
On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com> wrote:

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, > wrote:

It wasn’t changed, it has *always* been C++14 since the day we open
sourced it. I only investigated the platforms we officially support (Ubuntu
14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take
into account with that change? If you have already done the assessment here
it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev < > swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on
14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev < > swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't
have any objections to this and don't foresee any major problems. The one
place where we'd need to be careful is with LLDB, which imports Swift
headers; if Swift is going to move to C++14, then Swift-LLDB probably has
to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements
on Linux didn't support C++14. It looks like our README is vague on that,
but LLDB already suggests a minimum requirement of Clang 3.5, which is new
enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev < > swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use
`auto` return types without trailing type information). Joe mentioned that
there was some interest in switching the rest of swift to C++14 as well. I
figured that I would just start a thread here to determine if this is okay
to do globally rather than just specifically for the Windows builds to
ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org

I’m pinging some folks, but not everybody is back yet. I hope to resolve this ASAP.

···

On Jan 2, 2018, at 11:33 AM, Saleem Abdulrasool <compnerd@compnerd.org> wrote:

On Wed, Dec 20, 2017 at 4:26 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, 8:33 PM -0800, Ted Kremenek via swift-dev <swift-dev@swift.org>, wrote:

On Dec 19, 2017, at 5:08 PM, Saleem Abdulrasool <compnerd@compnerd.org> wrote:

On Dec 19, 2017, at 3:59 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com> wrote:

On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com> wrote:

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

Interesting. Was that not a concern when that choice was made for llbuild, or was the context different?

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

That’s a significant change to make just to get C++14 support guaranteed, and (I believe) would have a non-trivial impact on those using development environments that expect to use the Clang bundled with them to build projects.

Agreed. However, the current supported platforms already support this minimum. I think that future platforms will need to provide that anyways. If the system doesn’t have a modern toolchain available, I suspect that it already would not have C++11 available either. In such a scenario, they need to provide a newer toolchain, and so the difference there is minimal as we already require C++11.

OK, I’m convinced.

I want to hold off for a tiny bit just to see if anyone else has any commentary on this thread before we make a change.

We’d also need to make this change on the LLDB side, and I realize now that a few people I’d like to weigh in are on vacation until the holidays. How about we pick this up immediately in the new year once it’s clear everyone that should weigh in has had a chance to do so.

Just a post-holiday bump to bring this back up :-). I'd like to get this merged so that the other Windows stuff is unblocked.

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, wrote:
It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org

I have no formal objections to switching lldb to C++14. I haven't been following what is in C++14, but presumably it's purely additive? If so then except for bugs this should be a no-op.

My only reservation is it seems a little odd to adopt a "use C++14" policy for Swift lldb and not for llvm.org lldb. Is clang going to move to C++14 some time soon? I don't remember seeing anything about this on the lldb dev lists. If we're going to build GitHub lldb this way it would be worth raising the suggestion on the lldb-dev as well.

And of course, all this is dependent on lldb actually building and passing the testsuite built with C++14. Has somebody tried that?

Jim

···

On Jan 3, 2018, at 8:46 PM, Ted Kremenek via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

I’m pinging some folks, but not everybody is back yet. I hope to resolve this ASAP.

On Jan 2, 2018, at 11:33 AM, Saleem Abdulrasool <compnerd@compnerd.org> wrote:

On Wed, Dec 20, 2017 at 4:26 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, 8:33 PM -0800, Ted Kremenek via swift-dev <swift-dev@swift.org>, wrote:

On Dec 19, 2017, at 5:08 PM, Saleem Abdulrasool <compnerd@compnerd.org> wrote:

On Dec 19, 2017, at 3:59 PM, Ted Kremenek <kremenek@apple.com> wrote:

On Dec 19, 2017, at 2:31 PM, Daniel Dunbar <daniel_dunbar@apple.com> wrote:

On Dec 19, 2017, at 2:27 PM, Ted Kremenek <kremenek@apple.com> wrote:

Fair enough.

We care about swiftc and llbuild building a variety of platforms today — FreeBSD, Rasberry Pi, etc. My impression is that C++14 is generally supported by both (a) the mininum versions of the distributions we support today and (b) the current versions of the platforms we’d like to expand Swift to in the future. Does that sound right? I suspect you went through the same kind of reasoning with llbuild.

It sounds reasonable, but to be honest I never did an audit of what platforms supported C++14.

Interesting. Was that not a concern when that choice was made for llbuild, or was the context different?

I do think that we could always use the Clang++ we build as part of Swift to build Swift itself. By that logic, it seems reasonable to expect we could always have C++14 support, although it does mean that porters would need modern Clang to support their platform. However, that is likely largely a prerequisite for Swift to work as well.

That’s a significant change to make just to get C++14 support guaranteed, and (I believe) would have a non-trivial impact on those using development environments that expect to use the Clang bundled with them to build projects.

Agreed. However, the current supported platforms already support this minimum. I think that future platforms will need to provide that anyways. If the system doesn’t have a modern toolchain available, I suspect that it already would not have C++11 available either. In such a scenario, they need to provide a newer toolchain, and so the difference there is minimal as we already require C++11.

OK, I’m convinced.

I want to hold off for a tiny bit just to see if anyone else has any commentary on this thread before we make a change.

We’d also need to make this change on the LLDB side, and I realize now that a few people I’d like to weigh in are on vacation until the holidays. How about we pick this up immediately in the new year once it’s clear everyone that should weigh in has had a chance to do so.

Just a post-holiday bump to bring this back up :-). I'd like to get this merged so that the other Windows stuff is unblocked.

- Daniel

On Dec 19, 2017, 2:23 PM -0800, Daniel Dunbar <daniel_dunbar@apple.com>, wrote:

It wasn’t changed, it has *always* been C++14 since the day we open sourced it. I only investigated the platforms we officially support (Ubuntu 14.04/15.10 at the time, and macOS 10.10+ IIRC).

- Daniel

On Dec 19, 2017, at 2:21 PM, Ted Kremenek <kremenek@apple.com> wrote:

Daniel,

When you changed llbuild to require C++14, what platforms did you take into account with that change? If you have already done the assessment here it could speed a resolution of a decision.

Thanks,
Ted

On Dec 13, 2017, at 3:19 PM, Daniel Dunbar via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

FWIW, llbuild requires C++14.

We have to do some minor shenanigans to workaround bugs in libstdc++ on 14.04, and our use is probably minimal, but just throwing that out there.

- Daniel

On Dec 13, 2017, at 1:45 PM, Jordan Rose via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

No one else has commented on this yet today, so I'll put in that I don't have any objections to this and don't foresee any major problems. The one place where we'd need to be careful is with LLDB, which imports Swift headers; if Swift is going to move to C++14, then Swift-LLDB probably has to as well. LLDB folks, what do you think?

The other thing to check is if our minimum Clang or libstdc++ requirements on Linux didn't support C++14. It looks like our README is vague on that, but LLDB already suggests a minimum requirement of Clang 3.5, which is new enough. I suspect we're okay here.

Jordan

On Dec 13, 2017, at 10:36, Saleem Abdulrasool via swift-dev <swift-dev@swift.org> wrote:

Hi,

The newer Windows SDK requires the use of C++14 (the SDK headers use `auto` return types without trailing type information). Joe mentioned that there was some interest in switching the rest of swift to C++14 as well. I figured that I would just start a thread here to determine if this is okay to do globally rather than just specifically for the Windows builds to ensure that we can build the Windows components.

Thanks.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev