What is the difference in gcc between lto and fat-lto-objects

Probably it will be helpful to someone:
Here wrote next:

The current implementation only produces “fat” objects, effectively doubling compilation time and increasing file sizes up to 5x the original size

So as I think it's the main reason.


The difference between fat and non-fat object files is that fat object files contains both intermediate language as well as the normally compiled code. At linktime, if you invoke compiler without -flto, fat objects will be handled as normal object files (and LTO information discarded), while slim objects will invoke LTO optimizers because there is no way to handle them without it.

If you both compile and link with -flto, both fat and slim objects ought to give you the same binary, just slim objects will be smaller and faster to compile, because you will avoid the redundant code generation.