RFR: 8343698: Linux x86_64 lto build gives a lot of warnings and fails lto-wrapper: fatal error: make returned 2 exit status
Kim Barrett
kbarrett at openjdk.org
Thu Nov 14 09:11:16 UTC 2024
On Thu, 14 Nov 2024 08:58:09 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> make/hotspot/lib/JvmFeatures.gmk line 173:
>>
>>> 171: JVM_OPTIMIZATION := HIGHEST_JVM
>>> 172: ifeq ($(call isCompiler, gcc), true)
>>> 173: JVM_CFLAGS_FEATURES += -DINCLUDE_LTO=1 -flto=auto -fuse-linker-plugin -fno-strict-aliasing \
>>
>> I'm not sure why this was included in this PR (and similarly below), since
>> there's no use of it anywhere. However, it would be useful for
>> conditionalizing the definition of FORBID_C_FUNCTION, as suggested in JBS. But
>> just adding the defines here is not sufficient. In utilities/macros.hpp, there
>> should be a conditional #define to the default value (0) if the macro is not
>> already defined, so that we can consistently use `#if INCLUDE_LTO` and
>> `#if !INCLUDE_LTO`.
>
> It was included because all JVM features have a related define (e.g. INCLUDE_JFR, INCLUDE_JVMCI) and I missed that one here.
> Or is it already available and I just missed the define related to link-time-optimization ?
> But in a way you are correct , currently the added define it not needed technically in this PR .
> And we might think about the naming (INCLUDE_LINK_TIME_OPTIMIZATION vs. INCLUDE_LTO).
I'd prefer a more meaningful name. LTO seems a little generic and opaque. If you know then you
know, but if you don't then you are puzzled.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22069#discussion_r1841821732
More information about the build-dev
mailing list