On Thu, 6 Nov 2025 13:53:07 GMT, Erik Joelsson <[email protected]> wrote:
>>> I don't think adding the LTO flags to the OPT flags is the right move >> >> So where should I move it? After all it is link time *optimization* so it is >> an optimization related tool feature. >> But should I remove it completely from SetupCompileFileFlags because having >> it in SetupCompilerFlags is sufficient for out task ? > > Again, the optimization flags aren't handled as a separate set of variables > because they are of the category "optimization". It's because optimization > flags are handled on a higher level with an abstraction of "low", "medium", > "high" etc, and that abstraction allows for specific file overrides. That's > what the `*_OPT_C*FLAGS` are there to handle. Since the LTO flags are not > related to this abstraction, they should not be mixed into these variables, > that is just confusing and adding unnecessary complexity. > > The LTO flags should just be stacked on to the `$1_EXTRA_*` flags like any > other. I adjusted my changes to Flags.gmk . ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27976#discussion_r2504024684
