Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94c83252 authored by Thiébaud Weksteen's avatar Thiébaud Weksteen
Browse files

rust: collect file dependencies for clippy

Previously, the clippy rule did not keep track of the source files for
which a modification would require the target to be rebuilt. Similarly
to the rustc rule, ensure that we capture all the dependencies via the
dep-info output.

Bug: 181298002
Test: m libkeystore2; inspect generated .clippy.d
Change-Id: Icfc7074e1fca38f7782544e6c436ffbfc6c9b4e0
parent da42a5a2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -51,9 +51,12 @@ var (
			Command: "$envVars $clippyCmd " +
				// Because clippy-driver uses rustc as backend, we need to have some output even during the linting.
				// Use the metadata output as it has the smallest footprint.
				"--emit metadata -o $out $in ${libFlags} " +
				"$rustcFlags $clippyFlags",
				"--emit metadata -o $out --emit dep-info=$out.d.raw $in ${libFlags} " +
				"$rustcFlags $clippyFlags" +
				" && grep \"^$out:\" $out.d.raw > $out.d",
			CommandDeps: []string{"$clippyCmd"},
			Deps:        blueprint.DepsGCC,
			Depfile:     "$out.d",
		},
		"rustcFlags", "libFlags", "clippyFlags", "envVars")