RFR: 8304893: Link Time Optimization with gcc can be faster [v2]
Julian Waters
jwaters at openjdk.org
Thu Mar 30 23:29:16 UTC 2023
On Wed, 29 Mar 2023 13:32:47 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> make/hotspot/lib/JvmFeatures.gmk line 173:
>>
>>> 171: ifeq ($(call isCompiler, gcc), true)
>>> 172: JVM_CFLAGS_FEATURES += -flto=$(JOBS) -fuse-linker-plugin -fno-strict-aliasing -fno-fat-lto-objects
>>> 173: JVM_LDFLAGS_FEATURES += -O3 -flto=$(JOBS) -fuse-linker-plugin -fno-strict-aliasing
>>
>> Shouldn't the `-O3` be using the `OPTIMIZATION` level in case it has been overridden from `HIGHEST_JVM`?
>
> It may make sense to have the `-O*` argument to the linker match what we do for compilation. I'm not sure how related they are.
Good catch, thanks. Will also add this flag to the opt-size option so it can override what link-time-opt has set
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13180#discussion_r1153880467
More information about the build-dev
mailing list