RFR: 8370438: Offer link time optimization support on library level

Erik Joelsson erikj at openjdk.org
Tue Nov 4 13:39:40 UTC 2025


On Tue, 4 Nov 2025 10:02:39 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> > It would be a little awkward to refactor only the JVM LTO flags into configure flags while leaving the rest of the JVM feature flags set by the Makefile, just my 2 cents.
> 
> The part in the Makefile would probably stay, but could reuse common flags from configure, e.g. something like this
> 
> ```
>     JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) -flto=auto \
>         -fuse-linker-plugin -fno-strict-aliasing
> =>
>     JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) $(LDFLAGS_LTO)
> ```

Yes, please only define the values once and use the variables in the JVM makefile.

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

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


More information about the build-dev mailing list