RFR: 8296115: Allow for compiling the JDK with strict standards conformance [v3]

Magnus Ihse Bursie ihse at openjdk.org
Wed Nov 2 15:34:52 UTC 2022


On Wed, 2 Nov 2022 11:55:34 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499) proposes to set the -permissive- flag for the Microsoft Visual C++ compiler, to enforce strict standards conformance during compilation, making native code behave more strictly. While adding it to default builds is likely not practical given how much testing is required, as an option it can prove helpful in finding areas of native code that are not conformant to the standard. Instead of applying this to just one compiler, we can also include this for every compiler that has support for such a strict mode, which this change does.
>
> Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
> 
>  - Merge remote-tracking branch 'upstream/master' into permissive
>  - Merge remote-tracking branch 'upstream/master' into permissive
>  - Format
>  - Keep docs up to date
>  - New --enable-conforming-compilation option

Looks good to me.

Goes the GHA test suite pass with this flag? If so, I think it would make sense to turn it on for our GHA builds. That will help raise the bar for future code coming in, and give this option some real testing.

make/autoconf/spec.gmk.in line 333:

> 331: ENABLE_HEADLESS_ONLY := @ENABLE_HEADLESS_ONLY@
> 332: 
> 333: ENABLE_CONFORMING_COMPILATION := @ENABLE_CONFORMING_COMPILATION@

You don't need to export this in spec.gmk, since it is only checked in the configure script. We try hard to only export here what is strictly necessary for use by makefiles. If you will ever need it in the future, please add it as an export here at that time.

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

Marked as reviewed by ihse (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10912



More information about the build-dev mailing list