aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-07-08 20:57:09 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-07-09 04:09:46 +0530
commit416a00308f5b0f228af3c93eb597eca8529fdbb0 (patch)
tree39e2576abdb4b6e79fa96d488e4413dc3af652dd /mesonbuild/scripts
parent2093d45a4e1203d868d200628918472877c7ec31 (diff)
downloadmeson-416a00308f5b0f228af3c93eb597eca8529fdbb0.zip
meson-416a00308f5b0f228af3c93eb597eca8529fdbb0.tar.gz
meson-416a00308f5b0f228af3c93eb597eca8529fdbb0.tar.bz2
cross: Use ExternalProgram for cross-file exe_wrapper
We already have code to fetch and find binaries specified in a cross file, so use the same code for exe_wrapper. This allows us to handle the same corner-cases that were fixed for other cross binaries.
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r--mesonbuild/scripts/meson_exe.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py
index a70acca..ee5906b 100644
--- a/mesonbuild/scripts/meson_exe.py
+++ b/mesonbuild/scripts/meson_exe.py
@@ -19,6 +19,8 @@ import pickle
import platform
import subprocess
+from .. import mesonlib
+
options = None
def buildparser():
@@ -49,7 +51,7 @@ def run_exe(exe):
if exe.exe_runner is None:
raise AssertionError('BUG: Trying to run cross-compiled exes with no wrapper')
else:
- cmd = [exe.exe_runner] + exe.fname
+ cmd = exe.exe_runner.get_command() + exe.fname
else:
cmd = exe.fname
child_env = os.environ.copy()
@@ -57,7 +59,7 @@ def run_exe(exe):
if len(exe.extra_paths) > 0:
child_env['PATH'] = (os.pathsep.join(exe.extra_paths + ['']) +
child_env['PATH'])
- if exe.exe_runner and 'wine' in exe.exe_runner:
+ if exe.exe_runner and mesonlib.substring_is_in_list('wine', exe.exe_runner.get_command()):
wine_paths = ['Z:' + p for p in exe.extra_paths]
wine_path = ';'.join(wine_paths)
# Don't accidentally end with an `;` because that will add the