On Mon, 18 Nov 2024 08:50:59 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

>> The old LTO used to set -O3 directly on both LDFLAGS and CFLAGS, bypassing 
>> OPTIMIZATION variable entirely. Just wanted to put this out there, since the 
>> topic of traditional gcc LTO came up. I changed that to set OPTIMIZATION to 
>> HIGHEST_JVM some time ago, and I'm not sure whether my change played any 
>> part in breaking LTO
>> 
>> LTO is currently only supported for VC and gcc. I can look into how to 
>> implement it for clang, though not now. First I'm committed to fixing all 
>> the issues with LTO, and making sure Kim's worry of poisoning virtually 
>> disappearing when LTO is enabled doesn't become a reality
>
> Agree, we should support LTO for gcc AND clang on Linux/macOS.
> Regarding the longer link/build times , I can add some info how much longer 
> it takes in our environment (SUSE Linux/gcc).

I can add some info here: On Windows, with LTO enabled it takes gcc about 15-20 
minutes to link the JVM, without it takes anywhere between 8-10 minutes to do 
so. ld is very slow on Windows due to a bug, so the numbers are skewed towards 
the high end. I don't have any numbers for VC, but I can assume that even LTO 
with VC and link.exe is very fast, because VC in general is an extremely fast 
compiler

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22069#discussion_r1846588693

Reply via email to