diff options
Diffstat (limited to 'apex/apex.go')
| -rw-r--r-- | apex/apex.go | 47 |
1 files changed, 4 insertions, 43 deletions
diff --git a/apex/apex.go b/apex/apex.go index fdc105e37..91770f464 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -63,7 +63,6 @@ var ( testTag = dependencyTag{name: "test", payload: true} keyTag = dependencyTag{name: "key"} certificateTag = dependencyTag{name: "certificate"} - usesTag = dependencyTag{name: "uses"} androidAppTag = dependencyTag{name: "androidApp", payload: true} rroTag = dependencyTag{name: "rro", payload: true} bpfTag = dependencyTag{name: "bpf", payload: true} @@ -764,7 +763,6 @@ func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) { ctx.BottomUp("apex", apexMutator).Parallel() ctx.BottomUp("apex_directly_in_any", apexDirectlyInAnyMutator).Parallel() ctx.BottomUp("apex_flattened", apexFlattenedMutator).Parallel() - ctx.BottomUp("apex_uses", apexUsesMutator).Parallel() ctx.BottomUp("mark_platform_availability", markPlatformAvailability).Parallel() } @@ -1007,12 +1005,6 @@ func apexFlattenedMutator(mctx android.BottomUpMutatorContext) { } } -func apexUsesMutator(mctx android.BottomUpMutatorContext) { - if ab, ok := mctx.Module().(*apexBundle); ok { - mctx.AddFarVariationDependencies(nil, usesTag, ab.properties.Uses...) - } -} - var ( useVendorAllowListKey = android.NewOnceKey("useVendorAllowList") ) @@ -1132,12 +1124,6 @@ type apexBundleProperties struct { HideFromMake bool `blueprint:"mutated"` - // Indicates this APEX provides C++ shared libaries to other APEXes. Default: false. - Provide_cpp_shared_libs *bool - - // List of providing APEXes' names so that this APEX can depend on provided shared libraries. - Uses []string - // package format of this apex variant; could be non-flattened, flattened, or zip. // imageApex, zipApex or flattened ApexType apexPackaging `blueprint:"mutated"` @@ -1477,6 +1463,8 @@ type apexBundle struct { lintReports android.Paths payloadFsType fsType + + distFiles android.TaggedDistFiles } func addDependenciesForNativeModules(ctx android.BottomUpMutatorContext, @@ -2179,30 +2167,6 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { var provideNativeLibs []string var requireNativeLibs []string - // Check if "uses" requirements are met with dependent apexBundles - var providedNativeSharedLibs []string - useVendor := proptools.Bool(a.properties.Use_vendor) - ctx.VisitDirectDepsBlueprint(func(m blueprint.Module) { - if ctx.OtherModuleDependencyTag(m) != usesTag { - return - } - otherName := ctx.OtherModuleName(m) - other, ok := m.(*apexBundle) - if !ok { - ctx.PropertyErrorf("uses", "%q is not a provider", otherName) - return - } - if proptools.Bool(other.properties.Use_vendor) != useVendor { - ctx.PropertyErrorf("use_vendor", "%q has different value of use_vendor", otherName) - return - } - if !proptools.Bool(other.properties.Provide_cpp_shared_libs) { - ctx.PropertyErrorf("uses", "%q does not provide native_shared_libs", otherName) - return - } - providedNativeSharedLibs = append(providedNativeSharedLibs, other.properties.Native_shared_libs...) - }) - var filesInfo []apexFile // TODO(jiyong) do this using WalkPayloadDeps ctx.WalkDepsBlueprint(func(child, parent blueprint.Module) bool { @@ -2350,11 +2314,6 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { // tags used below are private (e.g. `cc.sharedDepTag`). if cc.IsSharedDepTag(depTag) || cc.IsRuntimeDepTag(depTag) { if cc, ok := child.(*cc.Module); ok { - if android.InList(cc.Name(), providedNativeSharedLibs) { - // If we're using a shared library which is provided from other APEX, - // don't include it in this APEX - return false - } if cc.UseVndk() && proptools.Bool(a.properties.Use_vndk_as_stable) && cc.IsVndk() { requireNativeLibs = append(requireNativeLibs, ":vndk") return false @@ -2522,6 +2481,8 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { a.buildApexDependencyInfo(ctx) a.buildLintReports(ctx) + + a.distFiles = a.GenerateTaggedDistFiles(ctx) } // Enforce that Java deps of the apex are using stable SDKs to compile |