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

Commit e27ecb85 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fold annotations." am: b3f3e7b3

Original change: https://android-review.googlesource.com/c/platform/build/+/1944765

Change-Id: I46f99a9ce4d198ea8a88bb86feff52b913761fa8
parents 9bc76efb b3f3e7b3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,15 @@ import (
)

var (
	// RecognizedAnnotations identifies the set of annotations that have
	// meaning for compliance policy.
	RecognizedAnnotations = map[string]string{
		// used in readgraph.go to avoid creating 1000's of copies of the below 3 strings.
		"static":    "static",
		"dynamic":   "dynamic",
		"toolchain": "toolchain",
	}

	// ImpliesUnencumbered lists the condition names representing an author attempt to disclaim copyright.
	ImpliesUnencumbered = ConditionNames{"unencumbered"}

+4 −3
Original line number Diff line number Diff line
@@ -188,10 +188,11 @@ func addDependencies(edges *[]*dependencyEdge, target string, dependencies []*li
		}
		annotations := newEdgeAnnotations()
		for _, a := range ad.Annotations {
			if len(a) == 0 {
				continue
			// look up a common constant annotation string from a small map
			// instead of creating 1000's of copies of the same 3 strings.
			if ann, ok := RecognizedAnnotations[a]; ok {
				annotations.annotations[ann] = true
			}
			annotations.annotations[a] = true
		}
		*edges = append(*edges, &dependencyEdge{target, dependency, annotations})
	}