On Thu, 14 Nov 2024 14:15:38 GMT, Matthias Baesken <mbaes...@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