summaryrefslogtreecommitdiff
path: root/java/base.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-11 17:17:50 -0700
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-11 17:17:50 -0700
commitb4d50380bf9024e14e72cc6f92ccb1610ec02875 (patch)
treef1b7d2e4441550f650a312b867c65617a45819cb /java/base.go
parent87b7d09e83e976fc8547534f97ec304d08e600c0 (diff)
parent0ac6ae721d7400e0f5fa6d03f08eca63412390cc (diff)
Merge "Add a trace_references_from dex optimization property" into main
Diffstat (limited to 'java/base.go')
-rw-r--r--java/base.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/base.go b/java/base.go
index 19fb2bcf2..8453a683b 100644
--- a/java/base.go
+++ b/java/base.go
@@ -888,6 +888,10 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
// Add dependency on libraries that provide additional hidden api annotations.
ctx.AddVariationDependencies(nil, hiddenApiAnnotationsTag, j.properties.Hiddenapi_additional_annotations...)
+ // Add dependency on (soft) downstream libs from which to trace references during optimization.
+ traceRefs := j.dexProperties.Optimize.Trace_references_from.GetOrDefault(ctx, []string{})
+ ctx.AddVariationDependencies(nil, traceReferencesTag, traceRefs...)
+
// For library dependencies that are component libraries (like stubs), add the implementation
// as a dependency (dexpreopt needs to be against the implementation library, not stubs).
for _, dep := range libDeps {