diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-07-23 16:50:10 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-07-24 18:54:52 -0700 |
commit | 9e8566a27710cb46603fafd69edcecbcf35a9dde (patch) | |
tree | cb19a624593fc689723201aceae8096e14f4cffe | |
parent | 1a27714f97b8f6d716e376e9fcf8e9f79f029c86 (diff) | |
download | meson-9e8566a27710cb46603fafd69edcecbcf35a9dde.zip meson-9e8566a27710cb46603fafd69edcecbcf35a9dde.tar.gz meson-9e8566a27710cb46603fafd69edcecbcf35a9dde.tar.bz2 |
Print a useful error when a compiler is not found in the cross file
-rw-r--r-- | mesonbuild/environment.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 7f5aae8..be92bfd 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -467,6 +467,8 @@ This is probably wrong, it should always point to the native compiler.''' % evar C, C++, ObjC, ObjC++, Fortran, CS so consolidate it here. ''' if self.is_cross_build() and want_cross: + if lang not in self.cross_info.config['binaries']: + raise EnvironmentException('{!r} compiler binary not defined in cross file'.format(lang)) compilers = mesonlib.stringlistify(self.cross_info.config['binaries'][lang]) # Ensure ccache exists and remove it if it doesn't if compilers[0] == 'ccache': |