Static variant deps are not considered as being in the same APEX

The shared variant of a cc_library module depends on the static variant
of the same module. The dependency is just to optimize the build time by
not compiling the same source files twice. It doesn't mean that the
"static:" dependencies of the static variant are used to build the
shared variant. Therefore, the inter-variant dependency is considered
as NOT being in the same APEX.

Bug: N/A
Test: m

Change-Id: I7b8ff8e5bd5c9eb31fc4d8d18bd93dd80296fb81
diff --git a/cc/cc.go b/cc/cc.go
index b815268..ae11aa1 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -3096,6 +3096,12 @@
 		// We don't track beyond LLNDK or from an implementation library to its stubs.
 		return false
 	}
+	if depTag == staticVariantTag {
+		// This dependency is for optimization (reuse *.o from the static lib). It doesn't
+		// actually mean that the static lib (and its dependencies) are copied into the
+		// APEX.
+		return false
+	}
 	return true
 }