diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-02-09 09:17:38 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-09 19:32:20 +0200 |
commit | a155935d24a8c7e80a7849c83153cc864f11c8b0 (patch) | |
tree | 13edc46c6d44c6d38f53ab643e7b4f782488b3cc /mesonbuild/backend/backends.py | |
parent | ba770d18778ee446b3615babcf3bfad604b664bc (diff) | |
download | meson-a155935d24a8c7e80a7849c83153cc864f11c8b0.zip meson-a155935d24a8c7e80a7849c83153cc864f11c8b0.tar.gz meson-a155935d24a8c7e80a7849c83153cc864f11c8b0.tar.bz2 |
backends: Always use the command returned by as_meson_exe_cmdline()
Even if the command is not wrapped by meson, it could have been modified
to add java/mono interpreters. This fix potential inconsistency between
wrapped and unwrapped commands.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index df9c9eb..ea4f255 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -457,10 +457,10 @@ class Backend: if workdir: reasons.append('to set workdir') - if any('\n' in c for c in cmd_args): + if any('\n' in c for c in es.cmd_args): reasons.append('because command contains newlines') - if env and env.varnames: + if es.env and es.env.varnames: reasons.append('to set env') force_serialize = force_serialize or bool(reasons) @@ -470,7 +470,7 @@ class Backend: if not force_serialize: if not capture: - return None, '' + return es.cmd_args, '' return ((self.environment.get_build_command() + ['--internal', 'exe', '--capture', capture, '--'] + es.cmd_args), ', '.join(reasons)) @@ -487,7 +487,7 @@ class Backend: # Take a digest of the cmd args, env, workdir, and capture. This avoids # collisions and also makes the name deterministic over regenerations # which avoids a rebuild by Ninja because the cmdline stays the same. - data = bytes(str(env) + str(cmd_args) + str(es.workdir) + str(capture), + data = bytes(str(es.env) + str(es.cmd_args) + str(es.workdir) + str(capture), encoding='utf-8') digest = hashlib.sha1(data).hexdigest() scratch_file = 'meson_exe_{0}_{1}.dat'.format(basename, digest) |