RFR: 8344607: Link Time Optimization - basic support for clang [v4]

Matthias Baesken mbaesken at openjdk.org
Fri Dec 6 08:17:43 UTC 2024


On Fri, 6 Dec 2024 05:05:19 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> make/hotspot/lib/JvmFeatures.gmk line 182:
>> 
>>> 180:       JVM_CFLAGS_FEATURES += -ffat-lto-objects
>>> 181:     endif
>>> 182:     JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) -flto -fno-strict-aliasing
>> 
>> LGTM. ffat-lto-objects is needed on AIX, because gtest/gtestLauncher.cpp is compiled with -flto for libjvm.so, but also linked to libjvm/gtest/gtestLauncher without -flto in the link statement.
>
> I saw this too late, shouldn't it be isTargetOs instead of isBuildOs? Or am I mistaken and only gtest is affected, hence isBuildOs? Actually I'm not sure which one would be appropriate for gtest

I think in the AIX case the target an build OS is always the same so it should be okay as it is.
isTargetOs might generally fit better.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22412#discussion_r1872790266


More information about the build-dev mailing list