diff options
Diffstat (limited to 'src/buildstream/_context.py')
-rw-r--r-- | src/buildstream/_context.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py index bb9825f44..3c20834b0 100644 --- a/src/buildstream/_context.py +++ b/src/buildstream/_context.py @@ -25,6 +25,7 @@ from . import _yaml from ._exceptions import LoadError, LoadErrorReason from ._messenger import Messenger from ._profile import Topics, PROFILER +from ._platform import Platform from ._artifactcache import ArtifactCache from ._sourcecache import SourceCache from ._cas import CASCache, CASQuota, CASCacheUsage @@ -153,6 +154,7 @@ class Context(): self.messenger = Messenger() # Private variables + self._platform = None self._artifactcache = None self._sourcecache = None self._projects = [] @@ -343,6 +345,13 @@ class Context(): 'remote-execution']) @property + def platform(self): + if not self._platform: + self._platform = Platform.create_instance() + + return self._platform + + @property def artifactcache(self): if not self._artifactcache: self._artifactcache = ArtifactCache(self) |