iphonexcodeiosdistcc

Is it possible to use distcc for building iPhone device builds?


As far as I can tell, the moment I switch any of my projects from Simulator to Device build configuration, the build is no longer distributed, but built locally.

So, is there any kind of magic involved in getting Xcode to use the distributed building mechanism for device builds? Anyone have a definite word on this or even some hands-on experience?

Please do not downvote or close unless you understand the topic of distributed builds and Xcode. This is not a noobie question about signing for distribution.


Solution

  • We have also found that Xcode 3.2.5 does not distribute Device builds, whereas Simulator builds are distributed properly with distcc, despite setting all necessary options under Xcode Preferences -> Distributed Builds.

    However, it is possible to workaround Xcode's limitation and force it to also distribute Device builds. It looks like an oversight (bug!) on Apple's part that they have not enabled Device distributed builds by default.

    The steps you need to take are as follows:

    There are plenty of options to tweak in DISTCC_HOSTS, particularly concerning using your own localhost to also do some of the compilation instead of farming everything out, but the above should at least get you started. What works best for you will obviously depend on your own Mac hardware and network performance.

    In my own experience, using a distributed build server setup comprised of a couple of quad-core Macs together with my own dual-core Mac on a relatively slow network reduced the full Device re-build time down from about 15 minutes to about 5.