On Fri, 17 Jan 2025 11:41:06 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

> When building with link time optimization (lto) , configure flag is 
> --enable-jvm-feature-link-time-opt , we run in the gtest build into a lot of 
> errors.
> One workaround is just to configure without gtest ; this one changes the make 
> to NOT use the lto build flags for gtest , just for the "normal" libjvm.so .

I'm don't think I like this solution. It seems very hacky, adding on just LTO 
flags like that. I'd need to think a bit about the problem if I'm to suggest a 
better alternative, though.

Is the problem that LTO does not work with gtest, and this has not yet been 
fixed? Or is it supposed to never work, due to how LTO and gtest interact?

Is it possible to modify the set of JVM Features to not include `link-time-opt` 
when building gtest? I don't recall the exact flow of this, so it might not be 
possible. But if it is, I think it is a better solution.

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

PR Comment: https://git.openjdk.org/jdk/pull/23173#issuecomment-2602845759
PR Comment: https://git.openjdk.org/jdk/pull/23173#issuecomment-2602850091

Reply via email to