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
Fri Nov 15 22:31:45 UTC 2024


On Thu, 14 Nov 2024 14:15:38 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> > 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.
> 
> If you want me to change that I can add the handling of INCLUDE_LINK_TIME_OPTIMIZATION to macros.hpp . But unlikely many other macros the LTO JVM feature is usually not enabled, so this would mean we would set for every compilation unit` -DINCLUDE_LINK_TIME_OPTIMIZATION=0` which bloats the build log even more.

There's no need to set it for every compilation unit.  Like other feature handling in macros.hpp, something like this
needs to be added there:

#ifndef INCLUDE_LINK_TIME_OPTIMIZATION
#define INCLUDE_LINK_TIME_OPTIMIZATION 0
#endif

And of course, flip things if we later change to make LTO the default.

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

PR Comment: https://git.openjdk.org/jdk/pull/22069#issuecomment-2480050293


More information about the build-dev mailing list