From 1e4bdea7d8f5510c616bdc8e5d8dc6632fb2c50d Mon Sep 17 00:00:00 2001 From: Mark Schulte Date: Thu, 27 Oct 2016 14:42:43 -0700 Subject: [PATCH] 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. --- mesonbuild/backend/backends.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: