-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows Ninja to implement a jobserver-style pool of job slots, to better coordinate parallel jobs between spawned processes which compete for CPU cores/threads. With this feature, there is no need for being invoked from GNU Make or a script like misc/jobserver_pool.py. NOTE: This implementation is basic and doesn't support broken protocol clients that release more tokens than they acquired. If your build includes these, expect severe build performance degradation. To enable this use --jobserver or --jobserver=MODE on the command-line, where MODE is one of the following values: 0 Do not enable the feature (the default) 1 Enable the feature, using best mode for the current system. pipe Implement the pool with an anonymous pipe (Posix only). fifo Implement the pool with a FIFO file (Posix only). sem Implement the pool with a Win32 semaphore (Windows only). NOTE: The `fifo` mode is only implemented since GNU Make 4.4 and many older clients may not support it. Alternatively, set the NINJA_JOBSERVER environment variable to one of these values to activate it without a command-line option. Note that if MAKEFLAGS is set in the environment, Ninja assumes that it is already running in the context of another jobserver and will not try to create its own pool.
- Loading branch information
1 parent
0e0e489
commit 2e12658
Showing
5 changed files
with
201 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters