Restrict mixed build cquery to deps of depth 2.
This will be the list of targets directly being requested + additional
targets necessary for mixed_root. This reduces the size of the cquery
file by ~300Kb. Additionally, it removes unnecessary targets, making it
ever so slightly easier to find what one is looking for in cquery.out
for debugging purposes.
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I6d0e337c9ab7c13388459dee16415be0ab3c0506
diff --git a/android/bazel_handler.go b/android/bazel_handler.go
index 6648a2f..f645109 100644
--- a/android/bazel_handler.go
+++ b/android/bazel_handler.go
@@ -696,7 +696,7 @@
cqueryOutput, cqueryErr, err = context.issueBazelCommand(
context.paths,
bazel.CqueryBuildRootRunName,
- bazelCommand{"cquery", fmt.Sprintf("deps(%s)", buildrootLabel)},
+ bazelCommand{"cquery", fmt.Sprintf("deps(%s, 2)", buildrootLabel)},
"--output=starlark",
"--starlark:file="+absolutePath(cqueryFileRelpath))
err = ioutil.WriteFile(filepath.Join(soongInjectionPath, "cquery.out"),