diff options
Diffstat (limited to 'java')
| -rw-r--r-- | java/bootclasspath_fragment.go | 13 | ||||
| -rw-r--r-- | java/dexpreopt_bootjars.go | 3 | ||||
| -rw-r--r-- | java/dexpreopt_config.go | 19 |
3 files changed, 19 insertions, 16 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index d6777e50e..8fb8ba9a4 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -527,19 +527,18 @@ func (b *BootclasspathFragmentModule) getProfileProviderApex(ctx android.BaseMod } // Bootclasspath fragment modules that are for the platform do not produce boot related files. - apexInfos, _ := android.ModuleProvider(ctx, android.AllApexInfoProvider) - if apexInfos == nil { + apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider) + if apexInfo.IsForPlatform() { return "" } - for _, apexInfo := range apexInfos.ApexInfos { - for _, apex := range apexInfo.InApexVariants { - if isProfileProviderApex(ctx, apex) { - return apex + for _, config := range genBootImageConfigs(ctx) { + if config.profileProviderModule == b.BaseModuleName() { + if len(config.profileImports) > 0 { + return config.profileImports[0] } } } - return "" } diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 8c60d2399..497facb4d 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -293,6 +293,9 @@ type bootImageConfig struct { // Profiles imported from APEXes, in addition to the profile at the default path. Each entry must // be the name of an APEX module. profileImports []string + + // The name of the module that provides boot image profiles, if any. + profileProviderModule string } // Target-dependent description of a boot image. diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go index dc0973cdf..fb5c325d3 100644 --- a/java/dexpreopt_config.go +++ b/java/dexpreopt_config.go @@ -67,15 +67,16 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig // ART boot image for testing only. Do not rely on it to make any build-time decision. artCfg := bootImageConfig{ - name: artBootImageName, - enabledIfExists: "art-bootclasspath-fragment", - stem: bootImageStem, - installDir: "apex/art_boot_images/javalib", - modules: global.TestOnlyArtBootImageJars, - preloadedClassesFile: "art/build/boot/preloaded-classes", - compilerFilter: "speed-profile", - singleImage: false, - profileImports: profileImports, + name: artBootImageName, + enabledIfExists: "art-bootclasspath-fragment", + stem: bootImageStem, + installDir: "apex/art_boot_images/javalib", + modules: global.TestOnlyArtBootImageJars, + preloadedClassesFile: "art/build/boot/preloaded-classes", + compilerFilter: "speed-profile", + singleImage: false, + profileImports: profileImports, + profileProviderModule: "art-bootclasspath-fragment", } // Framework config for the boot image extension. |