On Fri, 24 Oct 2025 12:58:15 GMT, Matthias Baesken <[email protected]> wrote:

> We currently have support for LTO (link time optimization) for 
> Hotspot/libjvm, that can be enabled as a JVM feature.
> But for other JDK native libs, we do not have support for this feature.
> LTO and sometimes lead to faster and also in some cases smaller binaries, so 
> support for this might be interesting also for other libs and not only libjvm.

For libfontmanager the lib sizes decrease quite a lot on most platforms if LTO 
is enabled in the build of the lib.
libfontmanager.so / dylib / dll size  without/with LTO enabled

38M      / 17M   aix_ppc64
1.8M / 1.1M  linux_aarch64
2.0M / 1.3M  linux_alpine_x86_64
2.3M / 1.4M  linux_ppc64le
1.8M / 1.2M  linux_x86_64

1.4M / 900K   macos aarch64
1.4M / 952K   macos x86_64

932K / 916K   windows x86_64


(however the freetype lib does not show this decrease in lib size when enabling 
lto)

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

PR Comment: https://git.openjdk.org/jdk/pull/27976#issuecomment-3461353345

Reply via email to