On Fri, 31 Jan 2025 12:16:54 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> > I don't think there is much point in being able to vary the opt level; it > > is more about spending the time to find the most appropriate opt level, and > > once you've done that, you can update the makefile directly. > > You want to optimize for binary size in some scenarios but not in all. And > when looking at binary size (maybe also performance in some special cases) > lto is promising for some jdk libs but at least for now you don't want to > enable it as a default. > > Still, for some simple cases like e.g. BUILD_LIBSPLASHSCREEN changing the opt > level from LOW to SIZE is probably the best thing to do after some more > testing. I think LTO ability for native JDK code could be worthwhile as a flag, but having a JVM opt-size equivalent for the JDK native code is not as beneficial, given not many are really interested in the individual optimization levels of each module. In any case LibCommon.gmk and LauncherCommon.gmk is where I put these optimization overrides in my fork ------------- PR Comment: https://git.openjdk.org/jdk/pull/23332#issuecomment-2627422830