aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2016-04-14 22:52:15 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2016-04-15 00:25:34 +0530
commitc0765b0e8da6ad699b02dcc19a6480b3e6f71655 (patch)
tree62efa4ee1aaffb03afcf5ab8c0f8bd55ccf265bc /mesonbuild/backend/ninjabackend.py
parenta76693f338fa55a1d914c331fdb954e539e4561b (diff)
downloadmeson-c0765b0e8da6ad699b02dcc19a6480b3e6f71655.zip
meson-c0765b0e8da6ad699b02dcc19a6480b3e6f71655.tar.gz
meson-c0765b0e8da6ad699b02dcc19a6480b3e6f71655.tar.bz2
Don't require an exe_wrapper when cross-compiling 32-bit on 64-bit
Almost all 64-bit x86 OSes can run 32-bit x86 binaries natively. Detect that case and don't require an exe wrapper.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 201b2d1..4415a68 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -394,9 +394,11 @@ int dummy;
if isinstance(texe, build.Executable):
abs_exe = os.path.join(self.environment.get_build_dir(), self.get_target_filename(texe))
deps.append(self.get_target_filename(texe))
- if self.environment.is_cross_build() \
- and self.environment.cross_info.config['binaries'].get('exe_wrapper', None) is not None:
- cmd += [self.environment.cross_info.config['binaries']['exe_wrapper']]
+ if self.environment.is_cross_build() and \
+ self.environment.cross_info.need_exe_wrapper():
+ exe_wrap = self.environment.cross_info.config['binaries'].get('exe_wrapper', None)
+ if exe_wrap is not None:
+ cmd += [exe_wrap]
cmd.append(abs_exe)
else:
cmd.append(target.command)