aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-02-09 09:17:38 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2021-02-09 19:32:20 +0200
commita155935d24a8c7e80a7849c83153cc864f11c8b0 (patch)
tree13edc46c6d44c6d38f53ab643e7b4f782488b3cc /mesonbuild/backend/ninjabackend.py
parentba770d18778ee446b3615babcf3bfad604b664bc (diff)
downloadmeson-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/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 96ba4fa..6efa8da 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -956,12 +956,11 @@ int dummy;
for output in d.get_outputs():
elem.add_dep(os.path.join(self.get_target_dir(d), output))
- meson_exe_cmd, reason = self.as_meson_exe_cmdline(target.name, target.command[0], cmd[1:],
- extra_bdeps=target.get_transitive_build_target_deps(),
- capture=ofilenames[0] if target.capture else None,
- env=target.env)
- if meson_exe_cmd:
- cmd = meson_exe_cmd
+ cmd, reason = self.as_meson_exe_cmdline(target.name, target.command[0], cmd[1:],
+ extra_bdeps=target.get_transitive_build_target_deps(),
+ capture=ofilenames[0] if target.capture else None,
+ env=target.env)
+ if reason:
cmd_type = ' (wrapped by meson {})'.format(reason)
else:
cmd_type = ''
@@ -2101,11 +2100,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
outfilelist = outfilelist[len(generator.outputs):]
args = self.replace_paths(target, args, override_subdir=subdir)
cmdlist = exe_arr + self.replace_extra_args(args, genlist)
- meson_exe_cmd, reason = self.as_meson_exe_cmdline('generator ' + cmdlist[0],
- cmdlist[0], cmdlist[1:],
- capture=outfiles[0] if generator.capture else None)
- if meson_exe_cmd:
- cmdlist = meson_exe_cmd
+ cmdlist, reason = self.as_meson_exe_cmdline('generator ' + cmdlist[0],
+ cmdlist[0], cmdlist[1:],
+ capture=outfiles[0] if generator.capture else None)
abs_pdir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target))
os.makedirs(abs_pdir, exist_ok=True)