Xcode 8.0 Swift 3.0 slow indexing and building

后端 未结 16 2119
天涯浪人
天涯浪人 2020-12-07 17:12

I\'ve installed Xcode 8.0 and converted Swift 2.2 to 3.0 (that process also took a lot of time, I just left my Mac running all night). I have not a big project (about 20 fil

16条回答
  •  庸人自扰
    2020-12-07 17:26

    Go to project settings, then Editor > Add Build Setting > Add User-Defined Setting, and add the following:

    SWIFT_WHOLE_MODULE_OPTIMIZATION = YES
    

    Adding this flag dropped our clean-build compile times from 7 mins to 65s for a 40KLOC swift project, miraculously. Also can confirm 2 friends have seen similar improvements on enterprise projects.

    I can only assume this is some kind of bug in Xcode 8.0

提交回复
热议问题