Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to modify the number of parallel compilation with Xcode

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 a set of source files from a single project, on a single computer. (currently using Xcode 3.2.4)

Thanks

like image 478
dilig0 Avatar asked Mar 24 '11 10:03

dilig0


People also ask

How do I disable parallel build in Xcode?

By reducing the size of your targets, you will obtain a better parallelization. When opening your project in Xcode 10, build parallelization should already be enabled. To check or change this option, open your scheme editor, select “Build” in the sidebar and make sure “Parallelize Build” is checked at the top.

How do I reduce build time in Xcode?

Use parallelized builds: Parallelized builds can reduce total Xcode build times by building components of the app that do not depend on each other at the same time. For projects with many smaller dependencies that can easily be run in parallel, this can offer significant time savings.

What is incremental build Xcode?

'Incremental' says to compile only the files that are modified and 'Whole module' denotes to build all files in the project irrespective of the changes made. Action Points. 1. Goto 'Compilation Mode' in build settings. By default, Xcode 10 should have set it to 'Incremental' for Debug and 'Whole Module' for Release.


2 Answers

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 )

like image 81
Mimika Oh Avatar answered Oct 03 '22 17:10

Mimika Oh


Adjust the PBXNumberOfParallelBuildSubtasks user default, for example:

defaults write com.apple.XCode PBXNumberOfParallelBuildSubtasks 6
like image 27
一二三 Avatar answered Oct 03 '22 17:10

一二三