Skip to content

Support for GCC 15's incremental LTO #14428

Open
@thesamesam

Description

@thesamesam

GCC 15 supports incremental LTO via -flto-incremental=/path/to/cache/dir (docs) for fast rebuilds with LTO with small source file changes.

Currently, we have:

  • -Db_thinlto_cache
  • -Db_thinlto_cache_dir

...which support roughly the same thing in Meson for Clang.

GCC defaults to "thin LTO" so tying it to -Db_lto_mode=thin doesn't make much sense unless that were to become a default, and would likely IMO propagate confusion.

But it seems a shame to provide duplicate options that do essentially the same thing. I think it was a mistake to use specific vendor technology in the naming & description of these options, but it is what it is.

What do we do going forward?

Suggested options (more welcome):

  • Make -Db_thinlto_cache and -Db_thinlto_cache_dir do the right thing for GCC, and ignore the bad naming (this may be a bit messy given it only does something for Clang if -Db_lto_mode=thin)
  • Add duplicate options representing the same thing for GCC
  • Deprecate -Db_thinlto_cache and -Db_thinlto_cache_dir and replace them with new options that work for both Clang and GCC

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions