From 1cea5308a7915665d8d3480021ca2da00f5206eb Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 3 Dec 2024 16:40:08 -0800 Subject: Convert android.TransitionMutator to TransitionInfo Use the ApexInfo instead of a string as the TransitionInfo for apex variations. This removes the need for apexInfoMutator, which is the last remaining top down mutator. This has a variety of ramifications. One is that it is no longer possible to add a dependency onto the apex variation of a module, as that would require constructing a matching ApexInfo. Instead, anything that wants to add a dependency on the apex variation has to depend on the apex instead, and get to the module by walking its transistive dependencies. Another ramification is that modules in apexes can no longer determine which apexes they are in (unless they set UniqueApexVariations so that each variation is in exactly one apex). This prevents some of the existing container violation checks from working after this CL, tracked in b/394955484. It also requires using unique variation names for the prebuilt and source dependencies of apexes, so the apex variations for dependencies of prebuilts now have a prebuilt_ prefix. Bug: 372543712 Bug: 394955484 Test: go test ./... Change-Id: I3d08aca1ac956ab0e343ec3f235a736cd93be0e1 --- cc/cc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cc/cc.go') diff --git a/cc/cc.go b/cc/cc.go index dd557b58f..cb11fb845 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -4084,6 +4084,9 @@ func (c *Module) OutgoingDepIsInSameApex(depTag blueprint.DependencyTag) bool { } func (c *Module) IncomingDepIsInSameApex(depTag blueprint.DependencyTag) bool { + if c.Host() { + return false + } if c.HasStubsVariants() { if IsSharedDepTag(depTag) && !IsExplicitImplSharedDepTag(depTag) { // dynamic dep to a stubs lib crosses APEX boundary @@ -4224,7 +4227,6 @@ func (c *Module) typ() moduleType { type Defaults struct { android.ModuleBase android.DefaultsModuleBase - android.ApexModuleBase } // cc_defaults provides a set of properties that can be inherited by other cc -- cgit v1.2.3-59-g8ed1b