Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
302432e1
Commit
302432e1
authored
Sep 30, 2017
by
Felix Hädicke
Committed by
Max Kellermann
May 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python/makeproject: set appropriate build jobs count depending on the number of CPUs
parent
4ab8a677
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
makeproject.py
python/build/makeproject.py
+7
-2
No files found.
python/build/makeproject.py
View file @
302432e1
import
subprocess
import
subprocess
,
multiprocessing
from
build.project
import
Project
...
...
@@ -10,7 +10,12 @@ class MakeProject(Project):
self
.
install_target
=
install_target
def
get_simultaneous_jobs
(
self
):
return
12
try
:
# use twice as many simultaneous jobs as we have CPU cores
return
multiprocessing
.
cpu_count
()
*
2
except
NotImplementedError
:
# default to 12, if multiprocessing.cpu_count() is not implemented
return
12
def
get_make_args
(
self
,
toolchain
):
return
[
'--quiet'
,
'-j'
+
str
(
self
.
get_simultaneous_jobs
())]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment