diff options
| author | Sam James <sam@gentoo.org> | 2025-11-08 02:13:31 +0000 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-11-09 12:37:40 +0200 |
| commit | 66f648d0870286540511846f69a101e24dbe92c1 (patch) | |
| tree | c8614c5c1c33c5395aa51d4f920d73887c1ed8ec /mesonbuild/compilers/cpp.py | |
| parent | 8f3458dc849392f364899336433afdd8f11a06c6 (diff) | |
| download | meson-66f648d0870286540511846f69a101e24dbe92c1.tar.gz | |
compilers: support GCC incremental LTO
GCC 15 supports incremental LTO (caching). It's the same feature as
Clang's ThinLTO caching.
Unfortunately, for the Clang ThinLTO cache support, we chose a pretty
vendor-specific option name, and I don't want to worry about deprecating
that (-Db_thinlto_cache and -Db_thinlto_cache_dir) at this time, so...
Wire -Db_thinlto_cache and -Db_thinlto_cache_dir for GCC in the obvious
and natural way.
Other notes:
* GCC, unlike Clang, requires the cache dir to exist. If the
user passes an invalid directory, that's on them, but for our default
in meson-private, we should os.mkdir() it, so we do that now too.
* I did wonder about adding -flto-partition=cache, but when I asked about
this last year [0], the response was that it has too many caveats. Though
Honza did recently [1] suggest it has some utility, so I don't know. I'll
ask about it.
[0] https://inbox.sourceware.org/gcc-patches/vjeanwm7b2jnedzmbwww4cy6jf4prty6ypxvz7x5d463xw2mys@bxzxuvgfaplf/
[1] https://inbox.sourceware.org/gcc-patches/aLnAGpln6SXbjV7e@kam.mff.cuni.cz/
Closes: https://github.com/mesonbuild/meson/issues/14428
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
0 files changed, 0 insertions, 0 deletions
