how to modify the number of parallel compilation with Xcode

后端 未结 5 1309
生来不讨喜
生来不讨喜 2021-02-02 00:44

How to change the number of parallel compilations when building a C++ project with XCode ?

I am not talking about distributed builds, but on simultaneous compilations of

相关标签:
5条回答
  • 2021-02-02 01:10

    Adjust the PBXNumberOfParallelBuildSubtasks user default, for example:

    defaults write com.apple.XCode PBXNumberOfParallelBuildSubtasks 6
    
    0 讨论(0)
  • 2021-02-02 01:23

    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.

    0 讨论(0)
  • 2021-02-02 01:26

    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.

    0 讨论(0)
  • 2021-02-02 01:30

    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
    
    0 讨论(0)
  • 2021-02-02 01:35

    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 )

    0 讨论(0)
提交回复
热议问题