Over time, I have accumulated the following build settings for my Release builds in Xcode 10 based on some of the older WWDC "Swift compilation/performance" sessions:
SWIFT_OPTIMIZATION_LEVEL = -O SWIFT_COMPILATION_MODE = wholemodule OTHER_SWIFT_FLAGS = -whole-module-optimization LLVM_LTO = YES_THIN
Are these still the recommended way to compile Swift 5 binaries? In particular:
OTHER_SWIFT_FLAGS = -whole-module-optimizationbe removed, because it maybe is superseded by
SWIFT_COMPILATION_MODE = wholemodule?
- How much of a performance impact does
SWIFT_COMPILATION_MODE = wholemodulehave in practice? It seems to slow down "incremental" Release builds, e.g. when making minor changes and then having to recompile to profile their impact.
LLVM_LTO = YES_THINhave any effect on Swift code? Should I use
Any guidance would be much appreciated.