RFR: JDK-8300531: MSVC CFlags look suspicious [v2]
Erik Joelsson
erikj at openjdk.org
Thu Jan 19 19:25:56 UTC 2023
On Thu, 19 Jan 2023 17:27:57 GMT, Justin King <jcking at openjdk.org> wrote:
>> Update MSVC CFlags to be more consistent with other compilers. Also disables RTTI in a simliar manner to GCC/Clang for the JVM.
>
> Justin King 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 two additional commits since the last revision:
>
> - Merge branch 'openjdk:master' into msvc-cflags
> - Update MSVC CFlags
>
> Signed-off-by: Justin King <jcking at google.com>
Changing the global optimization flags is a pretty big and potentially intrusive change. It's quite possible that the current flags need a re-evaluation, since they were chosen a long time ago, for a much older version of Visual Studio. But, doing that evaluation is going to take some work. What is the impact on footprint and performance? How thoroughly have you tested that the increased optimization level isn't triggering something in Hotspot? We have quite a bit of history of compiler optimizations not working well with certain things that are done in the JVM.
My expectation for a change like this is that it would come with a pretty extensive report on gains, losses and tradeoffs to motivate it. Then other OpenJDK participants would likely want to replicate those findings and verify with their own benchmarks and requirements. I don't think making the number after the O in the flags match what we use for other compilers is motivation enough to warrant a change like this. Different compilers are sure to have their optimization levels mean different things.
-------------
PR: https://git.openjdk.org/jdk/pull/12073
More information about the build-dev
mailing list