diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 5aa6702131a0..238021be951e 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2284,6 +2284,7 @@ def generate_swift_target(self, target): elem = NinjaBuildElement(self.all_outputs, self.get_target_filename(target), rulename, []) elem.add_dep(rel_objects) elem.add_dep(link_deps) + elem.add_dep([self.get_dependency_filename(t) for t in target.link_depends]) if isinstance(target, build.Executable): link_args += swiftc.get_std_exe_link_args() else: