aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-07-12 09:31:22 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-07-19 00:17:29 +0200
commit3ef7b231782e3554217a61b4b04f947be76e7ca7 (patch)
tree6aa5c289e0dbef70cf461c5eef55c5f520f27e8b /mesonbuild/backend/ninjabackend.py
parent28c93ce4af25750b721e2dcaebb1864d509edd32 (diff)
downloadmeson-3ef7b231782e3554217a61b4b04f947be76e7ca7.zip
meson-3ef7b231782e3554217a61b4b04f947be76e7ca7.tar.gz
meson-3ef7b231782e3554217a61b4b04f947be76e7ca7.tar.bz2
backends: hide meson --internal exe cmdline from backends
Return the command line from serialize_executable, which is then renamed to as_meson_exe_cmdline. This avoids repeating code that is common to custom targets and generators.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index b57a783..3dfb2ae 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -679,12 +679,11 @@ int dummy;
if extra_paths:
serialize = True
if serialize:
- exe_data = self.serialize_executable(target.name, target.command[0], cmd[1:],
- # All targets are built from the build dir
- self.environment.get_build_dir(),
- extra_paths=extra_paths,
- capture=ofilenames[0] if target.capture else None)
- cmd = self.environment.get_build_command() + ['--internal', 'exe', exe_data]
+ cmd = self.as_meson_exe_cmdline(target.name, target.command[0], cmd[1:],
+ # All targets are built from the build dir
+ self.environment.get_build_dir(),
+ extra_paths=extra_paths,
+ capture=ofilenames[0] if target.capture else None)
cmd_type = 'meson_exe.py custom'
else:
cmd_type = 'custom'
@@ -1787,14 +1786,13 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
args = self.replace_paths(target, args, override_subdir=subdir)
cmdlist = exe_arr + self.replace_extra_args(args, genlist)
if generator.capture:
- exe_data = self.serialize_executable(
+ cmd = self.as_meson_exe_cmdline(
'generator ' + cmdlist[0],
cmdlist[0],
cmdlist[1:],
self.environment.get_build_dir(),
capture=outfiles[0]
)
- cmd = self.environment.get_build_command() + ['--internal', 'exe', exe_data]
abs_pdir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target))
os.makedirs(abs_pdir, exist_ok=True)
else: