> the compiler will be able to rip out all of the functions that they don't use
Link-time optimization is already a thing. It's sad it doesn't seem to be used more often.
Link-time optimization is already a thing. It's sad it doesn't seem to be used more often.
On the other hand, if I am static linking, then there are no other programs that could use the static library. (Or, rather, if they do, they have their own embedded copy.) The LTO is free to remove any functions that I don't need, reducing the total amount that I need to ship.
LTO is really a much bigger deal, the main reason to use it is not throwing unused stuff away, but inlining across all the things.