diff options
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/apex/apex.go b/apex/apex.go index 56559b16b..c4545d292 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -24,7 +24,6 @@ import ( "sort" "strings" - "android/soong/aconfig" "github.com/google/blueprint" "github.com/google/blueprint/proptools" @@ -2272,7 +2271,7 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext, } func addAconfigFiles(vctx *visitorContext, ctx android.ModuleContext, module blueprint.Module) { - dep, _ := android.OtherModuleProvider(ctx, module, aconfig.TransitiveDeclarationsInfoProvider) + dep, _ := android.OtherModuleProvider(ctx, module, android.AconfigTransitiveDeclarationsInfoProvider) if len(dep.AconfigFiles) > 0 && dep.AconfigFiles[ctx.ModuleName()] != nil { vctx.aconfigFiles = append(vctx.aconfigFiles, dep.AconfigFiles[ctx.ModuleName()]...) } @@ -2371,6 +2370,25 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { a.buildApex(ctx) a.buildApexDependencyInfo(ctx) a.buildLintReports(ctx) + + // Set a provider for dexpreopt of bootjars + a.provideApexExportsInfo(ctx) +} + +// Set a provider containing information about the jars and .prof provided by the apex +// Apexes built from source retrieve this information by visiting `bootclasspath_fragments` +// Used by dex_bootjars to generate the boot image +func (a *apexBundle) provideApexExportsInfo(ctx android.ModuleContext) { + ctx.VisitDirectDepsWithTag(bcpfTag, func(child android.Module) { + if info, ok := android.OtherModuleProvider(ctx, child, java.BootclasspathFragmentApexContentInfoProvider); ok { + exports := android.ApexExportsInfo{ + ApexName: a.ApexVariationName(), + ProfilePathOnHost: info.ProfilePathOnHost(), + LibraryNameToDexJarPathOnHost: info.DexBootJarPathMap(), + } + android.SetProvider(ctx, android.ApexExportsInfoProvider, exports) + } + }) } // apexBootclasspathFragmentFiles returns the list of apexFile structures defining the files that @@ -2867,14 +2885,6 @@ func makeApexAvailableBaseline() map[string][]string { // // Module separator // - m["com.android.tethering"] = []string{ - "android.hardware.tetheroffload.config-V1.0-java", - "android.hardware.tetheroffload.control-V1.0-java", - "net-utils-framework-common", - } - // - // Module separator - // m["com.android.wifi"] = []string{ "PlatformProperties", "android.hardware.wifi-V1.0-java", @@ -2898,15 +2908,6 @@ func makeApexAvailableBaseline() map[string][]string { "wifi-nano-protos", "wifi-service-pre-jarjar", } - // - // Module separator - // - m[android.AvailableToAnyApex] = []string{ - "libprofile-clang-extras", - "libprofile-clang-extras_ndk", - "libprofile-extras", - "libprofile-extras_ndk", - } return m } |