summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-11-08 02:13:31 +0000
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-11-09 12:37:40 +0200
commit66f648d0870286540511846f69a101e24dbe92c1 (patch)
treec8614c5c1c33c5395aa51d4f920d73887c1ed8ec /docs/markdown
parent8f3458dc849392f364899336433afdd8f11a06c6 (diff)
downloadmeson-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 'docs/markdown')
-rw-r--r--docs/markdown/snippets/gcc_incremental_lto.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/markdown/snippets/gcc_incremental_lto.md b/docs/markdown/snippets/gcc_incremental_lto.md
new file mode 100644
index 000000000..50bb21837
--- /dev/null
+++ b/docs/markdown/snippets/gcc_incremental_lto.md
@@ -0,0 +1,4 @@
+## `-Db_thinlto_cache` now supported for GCC
+
+`-Db_thinlto_cache` is now supported for GCC 15's incremental LTO, as is
+`-Db_thinlto_cache_dir`. \ No newline at end of file