diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-07-12 17:46:58 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-07-19 00:17:29 +0200 |
commit | d34e53202043abab121ba93fa3922e5b2e4961b8 (patch) | |
tree | a95a9b867808d92579543ecd2ba3f102d85f39c5 /mesonbuild/scripts | |
parent | b4d313b05876a1af40014a4c3b129fe2db7cafb9 (diff) | |
download | meson-d34e53202043abab121ba93fa3922e5b2e4961b8.zip meson-d34e53202043abab121ba93fa3922e5b2e4961b8.tar.gz meson-d34e53202043abab121ba93fa3922e5b2e4961b8.tar.bz2 |
backends: do not split command and arguments in ExecutableSerialisation
This is not needed anymore, just make a single field with the whole
command line.
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r-- | mesonbuild/scripts/meson_exe.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py index 8f7d0fd..8b34448 100644 --- a/mesonbuild/scripts/meson_exe.py +++ b/mesonbuild/scripts/meson_exe.py @@ -42,10 +42,10 @@ def run_exe(exe): if exe.exe_runner: if not exe.exe_runner.found(): raise AssertionError('BUG: Can\'t run cross-compiled exe {!r} with not-found ' - 'wrapper {!r}'.format(exe.fname[0], exe.exe_runner.get_path())) - cmd = exe.exe_runner.get_command() + exe.fname + 'wrapper {!r}'.format(exe.cmd_args[0], exe.exe_runner.get_path())) + cmd_args = exe.exe_runner.get_command() + exe.cmd_args else: - cmd = exe.fname + cmd_args = exe.cmd_args child_env = os.environ.copy() child_env.update(exe.env) if exe.extra_paths: @@ -61,7 +61,7 @@ def run_exe(exe): else: child_env['WINEPATH'] = wine_path - p = subprocess.Popen(cmd + exe.cmd_args, env=child_env, cwd=exe.workdir, + p = subprocess.Popen(cmd_args, env=child_env, cwd=exe.workdir, close_fds=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -103,10 +103,7 @@ def run(args): with open(options.unpickle, 'rb') as f: exe = pickle.load(f) else: - exe_cmd = cmd_args[0] - cmd_args = cmd_args[1:] - exe = ExecutableSerialisation([exe_cmd], cmd_args, - capture=options.capture) + exe = ExecutableSerialisation(cmd_args, capture=options.capture) return run_exe(exe) |