UPX Compression of libLLVM
Recently we published CI to build cross-platform builds of libLLVM with universal Mac binaries and statically-linked libstdc++ on Windows. We have done some simple optimisation but the length of the build cycle means we haven’t explored that as thoroughly as we want to and have gone mostly for low-hanging fruit.
One of the tools that we used was UPX, a high-performance executable packer for several executable formats. Unfortunately, we encountered difficulties in optimising the Mac builds, which is already large since it contains two architectures. Linux saw a significant improvement but on Windows the compression was so significant that I was initially concerned it had failed.
Platform | Built | UPX |
---|---|---|
Linux | 115Mb | 75Mb |
MacOS | 203Mb | - |
Windows | 75Mb | 20Mb |
If you can suggest better ways of optimising these builds, pull requests are welcome!
Two new public repos: