summaryrefslogtreecommitdiff
path: root/src/buildstream/_project.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-07-16 15:51:39 +0200
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-17 10:42:53 +0000
commitdf92e8e08ea4ddfd58d6cfbf63d758cda5d3d44f (patch)
tree18552a6b837d8df1a4ec01a2d043d0a64634890f /src/buildstream/_project.py
parent6160a64cfc4788d9c7e0519b77f55ed870b6a6a7 (diff)
downloadbuildstream-df92e8e08ea4ddfd58d6cfbf63d758cda5d3d44f.tar.gz
Store Platform reference in Context instance variable
This allows us to remove the platform reset helpers in tests/conftest.py.
Diffstat (limited to 'src/buildstream/_project.py')
-rw-r--r--src/buildstream/_project.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py
index 95afc78b5..fa02143e1 100644
--- a/src/buildstream/_project.py
+++ b/src/buildstream/_project.py
@@ -43,7 +43,6 @@ from ._loader import Loader
from .element import Element
from ._message import Message, MessageType
from ._includes import Includes
-from ._platform import Platform
from ._workspaces import WORKSPACE_PROJECT_FILE
@@ -789,7 +788,7 @@ class Project():
# users should set values based on workload and build infrastructure
if self._context.build_max_jobs == 0:
# User requested automatic max-jobs
- platform = Platform.get_platform()
+ platform = self._context.platform
output.base_variables['max-jobs'] = str(platform.get_cpu_count(8))
else:
# User requested explicit max-jobs setting