This module contains a project that has two identical libraries and two identical executable targets that reference the libraries.
One set is just verbatim swift, the other one includes various flags to attempt to remove dead code.
The executable code makes sure to reference a symbol in the library, but after building, you will see that various methods and strings from types that are never used and by extension methods that are not referenced end up in the binary.
The Makefile in this directory contains some targets:
-
make: will build in release mode -
make dead-plainandmake dead-stripshow the 'no dead strip' flags set on members in both the regular library and the one compiled for stripping so we can compare what works and what does not with this flag. -
make stringscan show which strings are still visible in the resulting executable, for quickly determining if something is removed or not.