aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-07-08 20:57:09 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-07-09 04:09:46 +0530
commit416a00308f5b0f228af3c93eb597eca8529fdbb0 (patch)
tree39e2576abdb4b6e79fa96d488e4413dc3af652dd /mesonbuild/compilers/c.py
parent2093d45a4e1203d868d200628918472877c7ec31 (diff)
downloadmeson-416a00308f5b0f228af3c93eb597eca8529fdbb0.zip
meson-416a00308f5b0f228af3c93eb597eca8529fdbb0.tar.gz
meson-416a00308f5b0f228af3c93eb597eca8529fdbb0.tar.bz2
cross: Use ExternalProgram for cross-file exe_wrapper
We already have code to fetch and find binaries specified in a cross file, so use the same code for exe_wrapper. This allows us to handle the same corner-cases that were fixed for other cross binaries.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 8af7abc..fa6fd89 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -57,10 +57,9 @@ class CCompiler(Compiler):
self.id = 'unknown'
self.is_cross = is_cross
self.can_compile_suffixes.add('h')
- if isinstance(exe_wrapper, str):
- self.exe_wrapper = [exe_wrapper]
- else:
- self.exe_wrapper = exe_wrapper
+ self.exe_wrapper = exe_wrapper
+ if self.exe_wrapper:
+ self.exe_wrapper = self.exe_wrapper.get_command()
# Set to None until we actually need to check this
self.has_fatal_warnings_link_arg = None
@@ -278,7 +277,7 @@ class CCompiler(Compiler):
if self.exe_wrapper is None:
# Can't check if the binaries run so we have to assume they do
return
- cmdlist = self.exe_wrapper + [binary_name]
+ cmdlist = self.exe_wrapper.get_command() + [binary_name]
else:
cmdlist = [binary_name]
mlog.debug('Running test binary command: ' + ' '.join(cmdlist))