On Sun, Mar 24, 2024, 22:18 sotrdg sotrdg via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > gosh. GCC compiles so slow compared to clang with thin lto for C++, since > the translation unit tends to be big, without thin lto, it is extremely > hard to even get code compile nowadays due to its slowness. > Did you try the option "-fno-fat-lto-objects" ? Also, to get significant speedup, use -flto=auto. That will run parallel jobs. Read https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html for more fun. The LTO section is extensive.