https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120266
Oleg Endo <olegendo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |--- Ever confirmed|0 |1 Status|RESOLVED |NEW Last reconfirmed| |2025-05-15 --- Comment #8 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #4) > > This is one of many reasons that building libstdc++ with LTO is not > supported, and will probably break. > > I have some ideas for using a separate ref-counted string type in the > exceptions, so that it's neither the COW std::basic_string nor the > __cow_string kluge, but it's not a priority. Since this is a known deficit, I'd propose to leave this one open as a feature request. Being able to use LTO across _all_ libs/modules that go into a program can be quite useful in embedded/bare-metal environments. So I think it's a valid request. Just not supported at the moment.