summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorMark Schulte <schultetwin@gmail.com>2016-10-27 14:42:43 -0700
committerMark Schulte <schultetwin@gmail.com>2016-10-27 14:42:43 -0700
commit1e4bdea7d8f5510c616bdc8e5d8dc6632fb2c50d (patch)
tree49b7c609c954e5df3e39f11fdef4ef7112303b8d /mesonbuild/backend/backends.py
parentba578db0314aa85729ca13df734b2bd359d2aa35 (diff)
downloadmeson-1e4bdea7d8f5510c616bdc8e5d8dc6632fb2c50d.tar.gz
Allow running native executable in cross build
Make so both executable() targets that are marked as native and external programs (which are usually build tools compiled for the host machine) are not supposed to be run with the exe wrapper.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index fd719241e..e91b44b8d 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -200,11 +200,15 @@ class Backend():
with open(exe_data, 'wb') as f:
if isinstance(exe, dependencies.ExternalProgram):
exe_fullpath = exe.fullpath
+ exe_needs_wrapper = False
elif isinstance(exe, (build.BuildTarget, build.CustomTarget)):
exe_fullpath = [self.get_target_filename_abs(exe)]
+ exe_needs_wrapper = exe.is_cross
else:
exe_fullpath = [exe]
- is_cross = self.environment.is_cross_build() and \
+ exe_needs_wrapper = False
+ is_cross = exe_needs_wrapper and \
+ self.environment.is_cross_build() and \
self.environment.cross_info.need_cross_compiler() and \
self.environment.cross_info.need_exe_wrapper()
if is_cross: