aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-09-24 16:47:17 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2018-09-25 02:42:49 +0300
commit89e0414efd9ccad54c74c04d425c3974e6f64196 (patch)
treeb7e4eef7cdb2ede0ac40d81e3e5f63f0f4bc08e2 /mesonbuild/environment.py
parent2f0285c7ef3a3dab71e8d6f4df92ef978470c553 (diff)
downloadmeson-89e0414efd9ccad54c74c04d425c3974e6f64196.zip
meson-89e0414efd9ccad54c74c04d425c3974e6f64196.tar.gz
meson-89e0414efd9ccad54c74c04d425c3974e6f64196.tar.bz2
environment: validate endian value from cross file
When reading the endian from a cross file, validate that the value is either 'big' or 'little'.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 3ca8692..7a44f2f 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -1040,6 +1040,9 @@ class CrossBuildInfo:
if entry == 'cpu_family' and res not in known_cpu_families:
mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % value)
+ if entry == 'endian' and res not in ('little', 'big'):
+ mlog.warning('Unknown endian %s in cross file' % res)
+
if self.ok_type(res):
self.config[s][entry] = res
elif isinstance(res, list):