aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorOle André Vadla RavnÄs <oleavr@gmail.com>2020-04-09 21:09:05 +0000
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-05-13 15:51:54 +0000
commit859dc4255aa40611d323d1b22f70bb20c09f317d (patch)
tree15d74ebac23f689d762efdedf2c7cc788da5764e /mesonbuild/compilers
parentc4fa0fac3dd4f4451f73a50c3c523c8f83a3a6e1 (diff)
downloadmeson-859dc4255aa40611d323d1b22f70bb20c09f317d.zip
meson-859dc4255aa40611d323d1b22f70bb20c09f317d.tar.gz
meson-859dc4255aa40611d323d1b22f70bb20c09f317d.tar.bz2
Fix outdated cross-compilation checks
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/mixins/clike.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 0333ffa..e7b0cd2 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -369,7 +369,8 @@ class CLikeCompiler:
dependencies=dependencies, mode='link', disable_cache=disable_cache)
def run(self, code: str, env, *, extra_args=None, dependencies=None):
- if self.is_cross and self.exe_wrapper is None:
+ need_exe_wrapper = env.need_exe_wrapper(self.for_machine)
+ if need_exe_wrapper and self.exe_wrapper is None:
raise compilers.CrossNoRunException('Can not run test applications in this cross environment.')
with self._build_wrapper(code, env, extra_args, dependencies, mode='link', want_output=True) as p:
if p.returncode != 0:
@@ -377,7 +378,7 @@ class CLikeCompiler:
p.input_name,
p.returncode))
return compilers.RunResult(False)
- if self.is_cross:
+ if need_exe_wrapper:
cmdlist = self.exe_wrapper + [p.output_name]
else:
cmdlist = p.output_name