Shrinking While Linking

tweag.io

14 points by ingve 3 days ago


compiler-guy - an hour ago

"If you compiled your code with support for link-time optimization (LTO), it contains another copy (in the form of LLVM bitcode — more on that later) of all our code and the code of all our dependencies."

The author then goes and removes the lto-related code via objcopy. Which is fine, and great, and useful if you care about size more than having link-time optimization enabled for your end users.

But if you are just going to turn around and remove it, you probably shouldn't include it in the first place, which makes the original analysis of 132MB vs 15MB a little misleading.

kragen - 2 hours ago

Seems to be a dupe: https://news.ycombinator.com/item?id=46074222