Tune the 'profile.release' options for a smaller compile size.

Merged Nick Mathewson requested to merge nickm/arti:binary_size into main

By enabling link-time optimization, setting 'opt-level=s', and setting compilation-units=1, we can get a much smaller download size, which is one of our objectives.

Making these changes reduces the binary size for me (on x86_64) by about 42%. If you also run "strip --strip-debug" on the resulting binary, the resulting size is 55% smaller than the original binary size.

These effects persist if you compress the binary. Supposing that we use xz compression, these options make save 32% of compressed binary size. If we also "strip --strip-debug" before compressing, the compressed binary saves 43% from the original binary size.

With all of these options applied, on x86_64 linux with xz compression, we're at a nice 1.5 MiB download. If we statically link to openssl and sqlite, we're still only at a 2.8 MiB download.

There is a build time cost to these changes: for me, it comes to a 10%-25% build time increase.

This is part of #172 (closed).

Merge request reports