how to modify the number of parallel compilation with Xcode

5 Solutions Collect From Internet About “how to modify the number of parallel compilation with Xcode”

Adjust the PBXNumberOfParallelBuildSubtasks user default, for example:

defaults write com.apple.XCode PBXNumberOfParallelBuildSubtasks 6

For Xcode 4 you must set the IDEBuildOperationMaxNumberOfConcurrentCompileTasks user default, for example:

defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4

Note the “dt”. This won’t affect xcodebuild on the command line. To do that, use something like

xcodebuild -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=4 ...

(See http://lists.apple.com/archives/xcode-users/2011/Apr/msg00403.html and http://lists.apple.com/archives/xcode-users/2011/Jul//msg00377.html )

Just for the record – developers at our site using XCode 4 discovered that parallel compilation gets disabled if McAfee anti-virus is installed. Builds that should finish in 15-20 minutes took nearly five hours until McAfee was removed.

For command line builds, I’ve tested the 2011/Jul mailing list post that Mimika linked, and deployed it on our (Xcode 4.2, on Snow Leopard) build server to save memory like so:

defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 1

I don’t know why it drops from four to two, but I also found that quitting Xcode 6, then in Terminal entering “defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4” got me back to four when Xcode is restarted.