Run the build with the Count
build scheme. Look though the output which is updated. Run build.sh
to run a build with Release Configuration.
In Build.xcconfig
the setting below is defined. It can be commented out to remove the use of DataStore which ideally will cause the executable which links this Swift Package as a static library from the final binary for a Release build.
SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) USE_DATASTORE
- Public symbols are never dead stripped: (SR-521)
- Don't export public symbols from static libraries by default (SR-1021)
- Why public symbols are always no_dead_strip? (Swift Forums)
- nm
- otool
- symbols
- file
The parser will produce the Abstract Syntax Tree (AST) which can provide the name of the module for all symbols used in a source file so tha that all uses of the SDK can be counted.
- Dumping AST with Swift Compiler
- Swift Syntax (NSHipter)