aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWink Saville <wink@saville.com>2015-10-18 15:56:20 -0700
committerWink Saville <wink@saville.com>2015-10-18 15:56:20 -0700
commit5504c3ac950e3f34abf74550479111f763825ded (patch)
tree9d18cf66a4c8cd7d8a96bedd2428562dc99e7ab5
parent572ce0f4519488840d466befde6bb38ccb044e40 (diff)
downloadmeson-5504c3ac950e3f34abf74550479111f763825ded.zip
meson-5504c3ac950e3f34abf74550479111f763825ded.tar.gz
meson-5504c3ac950e3f34abf74550479111f763825ded.tar.bz2
Gracefully handle missing machine info.
-rw-r--r--authors.txt1
-rw-r--r--interpreter.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/authors.txt b/authors.txt
index fe479bf..315c25a 100644
--- a/authors.txt
+++ b/authors.txt
@@ -23,3 +23,4 @@ Marko Raatikainen
German Diago Gomez
Kyle Manna
Haakon Sporsheim
+Wink Saville
diff --git a/interpreter.py b/interpreter.py
index 8cb272c..d0f23c6 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -340,6 +340,11 @@ class BuildMachine(InterpreterObject):
class CrossMachineInfo(InterpreterObject):
def __init__(self, cross_info):
InterpreterObject.__init__(self)
+ minimum_cross_info = {'cpu', 'cpu_family', 'endian', 'system'}
+ if set(cross_info) < minimum_cross_info:
+ raise InterpreterException(
+ 'Machine info is currently {}\n'.format(cross_info) +
+ 'but is missing {}.'.format(minimum_cross_info - set(cross_info)))
self.info = cross_info
self.methods.update({'system' : self.system_method,
'cpu' : self.cpu_method,