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

Matthias Baesken mbaesken at openjdk.org
Tue Nov 4 10:06:26 UTC 2025


On Tue, 4 Nov 2025 09:29:25 GMT, Julian Waters <jwaters 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)

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

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


More information about the build-dev mailing list