aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/environment.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 47ab918..a7d1750 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -349,7 +349,9 @@ class Environment:
def detect_c_compiler(self, want_cross):
evar = 'CC'
if self.is_cross_build() and want_cross:
- compilers = [self.cross_info.config['binaries']['c']]
+ compilers = self.cross_info.config['binaries']['c']
+ if not isinstance(compilers, list):
+ compilers = [compilers]
ccache = []
is_cross = True
if self.cross_info.need_exe_wrapper():
@@ -386,13 +388,13 @@ class Environment:
continue
gtype = self.get_gnu_compiler_type(defines)
version = self.get_gnu_version_from_defines(defines)
- return GnuCCompiler(ccache + [compiler], version, gtype, is_cross, exe_wrap, defines)
+ return GnuCCompiler(ccache + compilers, version, gtype, is_cross, exe_wrap, defines)
if 'clang' in out:
if 'Apple' in out or for_darwin(want_cross, self):
cltype = CLANG_OSX
else:
cltype = CLANG_STANDARD
- return ClangCCompiler(ccache + [compiler], version, cltype, is_cross, exe_wrap)
+ return ClangCCompiler(ccache + compilers, version, cltype, is_cross, exe_wrap)
if 'Microsoft' in out or 'Microsoft' in err:
# Visual Studio prints version number to stderr but
# everything else to stdout. Why? Lord only knows.
@@ -401,7 +403,7 @@ class Environment:
if '(ICC)' in out:
# TODO: add microsoft add check OSX
inteltype = ICC_STANDARD
- return IntelCCompiler(ccache + [compiler], version, inteltype, is_cross, exe_wrap)
+ return IntelCCompiler(ccache + compilers, version, inteltype, is_cross, exe_wrap)
errmsg = 'Unknown compiler(s): "' + ', '.join(compilers) + '"'
if popen_exceptions:
errmsg += '\nThe follow exceptions were encountered:'