RFR: 8349214: Improve size optimization flags for MSVC builds

Matthias Baesken mbaesken at openjdk.org
Wed Feb 5 08:30:14 UTC 2025


On Tue, 4 Feb 2025 21:03:05 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> Sounds good then.
> 
> The optimization levels were kind of a mess that we "inherited" from the old build system, were they had just agglutinated over the years, probably dating back to Java 1.0, with nobody left around to remember why they were the way they were.
> 
> So it is definitely ripe for an overhaul. Anything you can do in this area is much appreciated, as long as it does not cause any regressions.

Thanks for the clarification !
Given that on Windows we compiled all the (JDK) native libraries with OPTIMIZATION setting LOW  in fact with O1 (minimize size / create the smallest code in the majority of cases) for years, there is a high chance that  size-optimization would work nicely for those (level LOW) too on platforms with gcc/clang ; but to be on the safe side we probably have to look into it on a per library level instead of just change it for all.

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

PR Comment: https://git.openjdk.org/jdk/pull/23432#issuecomment-2636053637


More information about the build-dev mailing list