Partial Revert "Populate individual classpath_fragments' classpaths.prot..."

Reason for revert: test breakage b/189114287
Bug: 180105615
Bug: 189114287
Test: atest sdkextensions_e2e_tests

Change-Id: I13b622d6c61ea392bfcc8a40535045c87fa3a7b5
This commit is contained in:
satayev
2021-05-25 14:31:50 +01:00
parent b40610ad00
commit a3fc817771
2 changed files with 10 additions and 11 deletions

View File

@@ -468,16 +468,8 @@ func (b *BootclasspathFragmentModule) generateClasspathProtoBuildActions(ctx and
} }
func (b *BootclasspathFragmentModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList { func (b *BootclasspathFragmentModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
if "art" == proptools.String(b.properties.Image_name) { // TODO(satayev): populate with actual content
return b.getImageConfig(ctx).modules return android.EmptyConfiguredJarList()
}
global := dexpreopt.GetGlobalConfig(ctx)
// Only create configs for updatable boot jars. Non-updatable boot jars must be part of the
// platform_bootclasspath's classpath proto config to guarantee that they come before any
// updatable jars at runtime.
return global.UpdatableBootJars.Filter(b.properties.Contents)
} }
func (b *BootclasspathFragmentModule) getImageConfig(ctx android.EarlyModuleContext) *bootImageConfig { func (b *BootclasspathFragmentModule) getImageConfig(ctx android.EarlyModuleContext) *bootImageConfig {

View File

@@ -203,11 +203,18 @@ func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.Mo
func (b *platformBootclasspathModule) generateClasspathProtoBuildActions(ctx android.ModuleContext) { func (b *platformBootclasspathModule) generateClasspathProtoBuildActions(ctx android.ModuleContext) {
// ART and platform boot jars must have a corresponding entry in DEX2OATBOOTCLASSPATH // ART and platform boot jars must have a corresponding entry in DEX2OATBOOTCLASSPATH
classpathJars := configuredJarListToClasspathJars(ctx, b.ClasspathFragmentToConfiguredJarList(ctx), BOOTCLASSPATH, DEX2OATBOOTCLASSPATH) classpathJars := configuredJarListToClasspathJars(ctx, b.ClasspathFragmentToConfiguredJarList(ctx), BOOTCLASSPATH, DEX2OATBOOTCLASSPATH)
// TODO(satayev): remove updatable boot jars once each apex has its own fragment
global := dexpreopt.GetGlobalConfig(ctx)
classpathJars = append(classpathJars, configuredJarListToClasspathJars(ctx, global.UpdatableBootJars, BOOTCLASSPATH)...)
b.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, classpathJars) b.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, classpathJars)
} }
func (b *platformBootclasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList { func (b *platformBootclasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
return b.getImageConfig(ctx).modules global := dexpreopt.GetGlobalConfig(ctx)
// TODO(satayev): split ART apex jars into their own classpathFragment
return global.BootJars
} }
// checkNonUpdatableModules ensures that the non-updatable modules supplied are not part of an // checkNonUpdatableModules ensures that the non-updatable modules supplied are not part of an