beanz added a comment. @phosek On darwin ld64 supports the flags `-all_load` and `-force_load` which work similarly to `--whole-archive`. The ld64 manpage has the documentation for those options. https://reviews.llvm.org/D37631