RFR: 8370438: Offer link time optimization support on library level [v5]

Matthias Baesken mbaesken at openjdk.org
Thu Nov 6 09:00:13 UTC 2025


On Wed, 5 Nov 2025 17:45:56 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use lto configure flags in hs build
>
> make/hotspot/lib/JvmFeatures.gmk line 186:
> 
>> 184:   else ifeq ($(call isCompiler, microsoft), true)
>> 185:     JVM_CFLAGS_FEATURES += $(CXX_O_FLAG_LTO)
>> 186:     JVM_LDFLAGS_FEATURES += $(LDFLAGS_LTO)
> 
> Now that we have variables for LTO flags, we shouldn't need compiler type checks for adding them. We can keep the conditionals for the other flags, but adding LTO flags looks compiler agnostic.

We still add CXX_O_FLAG_HIGHEST_JVM to the JVM_LDFLAGS_FEATURES for gcc/clang , but not for msvc. Not sure why.  So there is still a bit of difference between compilers.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27976#discussion_r2498082307


More information about the client-libs-dev mailing list