RFR: 8314488: Compile the JDK as C++17 [v6]

Kim Barrett kbarrett at openjdk.org
Wed Feb 14 16:03:08 UTC 2024


On Fri, 19 Jan 2024 14:04:50 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> Well, the only additional thing this PR does except raise the compiler version is to change the `--std` flag. It is a bit unclear what that means. For the JDK libraries, there are already code present that relies on C++17. For hotspot, what C++ constructions to use is strictly limited by the code standard document. As long as it does not mention any C++17 constructs, it does not really matter what the `--std` flag says. But, otoh, to be able to say something about C++17, we need first have proper support from all compilers.
> 
> So I'd say just chill a bit, give folks some time to respond. My understanding of the situation is as follows:
> 
>     * Raising clang to 13.0 is uncontroversial
> 
>     * Raising xlc to 17.1.1.4 seems acceptable by the folks using it (I hope I got that right)
> 
>     * Raising gcc to 10.0 met some resistance. We could stop at gcc 9.0 for this PR (which is enough for C++17), and then continue discussing going to gcc 10.0 in a separate PR, or we can wait a bit more to see if @shipilev feels compelled by the arguments given in the discussion to accept going to 10.

I'd like to separate the version update discussions from C++17 specifics, so
we can have focused discussions on the version choices. Of course, that's
going to be informed by the possibility of C++17, but that's not the only
factor. That way this issue can be just about turning on C++17, when, and why.

In order to do that, I've filed the following issues about version updates:
https://bugs.openjdk.org/browse/JDK-8325881
Require minimum gcc version 10

https://bugs.openjdk.org/browse/JDK-8325878
Require minimum clang version 13

https://bugs.openjdk.org/browse/JDK-8325880
Require minimum OpenXL C/C++ version 17.1.1

PRs will follow shortly.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14988#issuecomment-1944126546


More information about the build-dev mailing list