[PATCH] Enable /permissive- in OpenJDK source code
David Holmes
david.holmes at oracle.com
Sat Jun 22 14:37:41 UTC 2019
Hi Andrew,
On 21/06/2019 10:33 pm, Andrew Luo wrote:
> Hi Everyone,
>
> Inline is a patch to enable /permissive- in the OpenJDK source code. Recent changes have already been made to allow the OpenJDK source to compile with /permissive-:
>
> http://hg.openjdk.java.net/jdk/jdk/rev/feb860d41612
> http://hg.openjdk.java.net/jdk/jdk/rev/55dc1385d1b7
> http://hg.openjdk.java.net/jdk/jdk/rev/f67269c129f9
>
> For those that are wondering what /permissive- does: https://devblogs.microsoft.com/cppblog/permissive-switch/
>
> Feedback/comments are always welcome.
Probably needs to be done conditionally based on VS version. Although
VS2017 is the official compiler for 13 (now 14) I think older versions
are still in use.
Thanks,
David
> Thanks,
>
> -Andrew
>
> diff -r 72bbc930d7b6 make/autoconf/flags-cflags.m4
> --- a/make/autoconf/flags-cflags.m4 Sat Jun 22 02:03:41 2019 +0200
> +++ b/make/autoconf/flags-cflags.m4 Fri Jun 21 22:24:10 2019 -0700
> @@ -164,7 +164,7 @@
> case "${TOOLCHAIN_TYPE}" in
> microsoft)
> DISABLE_WARNING_PREFIX="-wd"
> - CFLAGS_WARNINGS_ARE_ERRORS="-WX"
> + CFLAGS_WARNINGS_ARE_ERRORS="-WX -permissive-"
> WARNINGS_ENABLE_ALL="-W3"
> DISABLED_WARNINGS="4800"
>
More information about the build-dev
mailing list