aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/interpreter/interpreter.py20
-rw-r--r--mesonbuild/modules/rust.py14
2 files changed, 20 insertions, 14 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index d80f5db..70cf2df 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -1829,20 +1829,22 @@ class Interpreter(InterpreterBase, HoldableObject):
self._validate_custom_target_outputs(len(kwargs['input']) > 1, kwargs['output'], "vcs_tag")
+ cmd = self.environment.get_build_command() + \
+ ['--internal',
+ 'vcstagger',
+ '@INPUT0@',
+ '@OUTPUT0@',
+ fallback,
+ source_dir,
+ replace_string,
+ regex_selector] + vcs_cmd
+
tg = build.CustomTarget(
kwargs['output'][0],
self.subdir,
self.subproject,
self.environment,
- self.environment.get_build_command() +
- ['--internal',
- 'vcstagger',
- '@INPUT0@',
- '@OUTPUT0@',
- fallback,
- source_dir,
- replace_string,
- regex_selector] + vcs_cmd,
+ cmd,
self.source_strings_to_files(kwargs['input']),
kwargs['output'],
build_by_default=True,
diff --git a/mesonbuild/modules/rust.py b/mesonbuild/modules/rust.py
index 792195e..bdbc3d0 100644
--- a/mesonbuild/modules/rust.py
+++ b/mesonbuild/modules/rust.py
@@ -210,16 +210,20 @@ class RustModule(ExtensionModule):
else:
name = header.get_outputs()[0]
+ cmd = self._bindgen_bin.get_command() + \
+ [
+ '@INPUT@', '--output',
+ os.path.join(state.environment.build_dir, '@OUTPUT@')
+ ] + \
+ kwargs['args'] + ['--'] + kwargs['c_args'] + inc_strs + \
+ ['-MD', '-MQ', '@INPUT@', '-MF', '@DEPFILE@']
+
target = CustomTarget(
f'rustmod-bindgen-{name}'.replace('/', '_'),
state.subdir,
state.subproject,
state.environment,
- self._bindgen_bin.get_command() + [
- '@INPUT@', '--output',
- os.path.join(state.environment.build_dir, '@OUTPUT@')] +
- kwargs['args'] + ['--'] + kwargs['c_args'] + inc_strs +
- ['-MD', '-MQ', '@INPUT@', '-MF', '@DEPFILE@'],
+ cmd,
[header],
[kwargs['output']],
depfile='@PLAINNAME@.d',