git clone https://github.com/apple-oss-distributions/cctools cd cctools git checkout cctools-65 make configure ./configure --prefix=/opt/cctools65 make && make install
A game development studio reported reducing their iOS app size from 187 MB to 152 MB simply by using ld64 from cctools 65 with -dead_strip_dylibs and -merge_zero_fill_sections . These linker flags aggressively remove unused code and compress zero-filled data segments.
Add to PATH:
: Do not blindly replace your system /usr/bin/ld or /usr/bin/codesign . Always install custom cctools in a separate prefix (e.g., /opt/cctools ).