mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1379961 - Add platform and architecture name to MozbuildObject. r=gps
MozReview-Commit-ID: 7F0oFEkTAsk --HG-- extra : rebase_source : f315397b6038bb6638fe999cea3cc514ba396011
This commit is contained in:
parent
63719ddbc7
commit
472220c52c
@ -269,6 +269,21 @@ class MozbuildObject(ProcessExecutionMixin):
|
||||
def statedir(self):
|
||||
return os.path.join(self.topobjdir, '.mozbuild')
|
||||
|
||||
@property
|
||||
def platform(self):
|
||||
"""Returns current platform and architecture name"""
|
||||
import mozinfo
|
||||
platform_name = None
|
||||
bits = str(mozinfo.info['bits'])
|
||||
if mozinfo.isLinux:
|
||||
platform_name = "linux" + bits
|
||||
elif mozinfo.isWin:
|
||||
platform_name = "win" + bits
|
||||
elif mozinfo.isMac:
|
||||
platform_name = "macosx" + bits
|
||||
|
||||
return platform_name, bits + 'bit'
|
||||
|
||||
@memoized_property
|
||||
def extra_environment_variables(self):
|
||||
'''Some extra environment variables are stored in .mozconfig.mk.
|
||||
|
Loading…
Reference in New Issue
Block a user