aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2020-03-18 11:45:49 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2020-03-19 19:09:18 +0200
commit12fa8d06e214223157ba281efea4e71dc5d0997e (patch)
treeae9f370f5e99f6750d5d019f31465ae476a5ca08
parente1060f577270528ca548a47aa3d77016e191d8ad (diff)
downloadmeson-12fa8d06e214223157ba281efea4e71dc5d0997e.zip
meson-12fa8d06e214223157ba281efea4e71dc5d0997e.tar.gz
meson-12fa8d06e214223157ba281efea4e71dc5d0997e.tar.bz2
Fix exe_wrapper usage in EmptyExternalProgram case
If no exe_wrapper is set in the meson cross file the exe_wrapper object will be an instance of EmptyExternalProgram. So, found is True and prorgram is an empty list. This will cause meson to tun the compiler sanity check because it checks only for self.is_cross and self.exe_wrapper being not None. I ran into that situation while cross compiling for ia32 on a x64_64 host. The host had no ia32 userspace installed, so the self test failed. As workaround I currently set exe_wrapper to 'true'. Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--mesonbuild/compilers/mixins/clike.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 3aca5fe..e043bcd 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -56,7 +56,7 @@ class CLikeCompiler:
self.can_compile_suffixes.add('h')
# If the exe wrapper was not found, pretend it wasn't set so that the
# sanity check is skipped and compiler checks use fallbacks.
- if not exe_wrapper or not exe_wrapper.found():
+ if not exe_wrapper or not exe_wrapper.found() or not exe_wrapper.get_command():
self.exe_wrapper = None
else:
self.exe_wrapper = exe_wrapper.get_command()