johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 566 forks source link

Support for whole module optimization #222

Closed mgamer closed 7 years ago

mgamer commented 7 years ago

Currently injectionforxcode only works if SWIFT_WHOLE_MODULE_OPTIMIZATION is disabled. Is support for whole module optimization technically possible? I'm asking because enabling whole module optimizations speeds up swift builds a lot.

johnno1962 commented 7 years ago

Injection needs to ba able to build an individual file for it to work which is not possible parsing the logs when using WMO so I’m afraid it’s either or.

johnno1962 commented 7 years ago

Having said that. You could try building you project without WMO once to set up the build logs which contain the compile commands. Then you can building it with WMO if that’s your preference and trying injection to see if it works.