Revert "Annotate dependency tags for dependencies of installed files"

This reverts commit 62a0cfd05460d0e760ce9133690e48861bb57eee.

Reason for revert: b/173475545

Change-Id: I4e834200c8e68dfa1b8144dfd1fa95ca68554980
diff --git a/android/arch.go b/android/arch.go
index 16211f8..98ff07a 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -598,10 +598,6 @@
 	// has dependencies on all the OS variants.
 	CommonOS = NewOsType("common_os", Generic, false)
 
-	// CommonArch is the Arch for all modules that are os-specific but not arch specific,
-	// for example most Java modules.
-	CommonArch = Arch{ArchType: Common}
-
 	osArchTypeMap = map[OsType][]ArchType{
 		Linux:       []ArchType{X86, X86_64},
 		LinuxBionic: []ArchType{Arm64, X86_64},
@@ -665,7 +661,7 @@
 	if _, found := commonTargetMap[name]; found {
 		panic(fmt.Errorf("Found Os type duplicate during OsType registration: %q", name))
 	} else {
-		commonTargetMap[name] = Target{Os: os, Arch: CommonArch}
+		commonTargetMap[name] = Target{Os: os, Arch: Arch{ArchType: Common}}
 	}
 
 	return os
@@ -823,6 +819,9 @@
 // Identifies the dependency from CommonOS variant to the os specific variants.
 var commonOsToOsSpecificVariantTag = archDepTag{name: "common os to os specific"}
 
+// Identifies the dependency from arch variant to the common variant for a "common_first" multilib.
+var firstArchToCommonArchDepTag = archDepTag{name: "first arch to common arch"}
+
 // Get the OsType specific variants for the current CommonOS variant.
 //
 // The returned list will only contain enabled OsType specific variants of the
@@ -961,6 +960,12 @@
 		addTargetProperties(m, targets[i], multiTargets, i == 0)
 		m.base().setArchProperties(mctx)
 	}
+
+	if multilib == "common_first" && len(modules) >= 2 {
+		for i := range modules[1:] {
+			mctx.AddInterVariantDependency(firstArchToCommonArchDepTag, modules[i+1], modules[0])
+		}
+	}
 }
 
 func addTargetProperties(m Module, target Target, multiTargets []Target, primaryTarget bool) {