Skip to content

Instantly share code, notes, and snippets.

@ManWithBear
Last active August 31, 2017 12:47
Show Gist options
  • Save ManWithBear/fbb17eb0ec66a4793271d163e9736196 to your computer and use it in GitHub Desktop.
Save ManWithBear/fbb17eb0ec66a4793271d163e9736196 to your computer and use it in GitHub Desktop.
Whole module optimization in swift

Whole module optimization does exactly what we want. It compiles all the files in one go. The problem with whole module optimization is that it optimizes, so its pretty slow. But if you add a user-defined custom flag; SWIFT_WHOLE_MODULE_OPTIMIZATION and set it to yes, as well as set the optimization level to none. It will do whole module optimization without optimizing. And it'll be super fast.
by https://www.skilled.io/u/swiftsummit/swift-with-a-hundred-engineers

@ManWithBear
Copy link
Author

ManWithBear commented Aug 31, 2017

This trick improve our build time from 6 min to 1 min on Xcode 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment