Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fbf8118 authored by Anton Hansson's avatar Anton Hansson Committed by Automerger Merge Worker
Browse files

Merge "Partial Revert "Populate individual classpath_fragments'...

Merge "Partial Revert "Populate individual classpath_fragments' classpaths.prot..."" into sc-dev am: bbe2d3db

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/14717811

Change-Id: I2857f28e17313fca7a2397f4e538a3c09de9b284
parents e33da475 bbe2d3db
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -490,16 +490,8 @@ func (b *BootclasspathFragmentModule) generateClasspathProtoBuildActions(ctx and
}

func (b *BootclasspathFragmentModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
	if "art" == proptools.String(b.properties.Image_name) {
		return b.getImageConfig(ctx).modules
	}

	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)
	// TODO(satayev): populate with actual content
	return android.EmptyConfiguredJarList()
}

func (b *BootclasspathFragmentModule) getImageConfig(ctx android.EarlyModuleContext) *bootImageConfig {
+8 −1
Original line number Diff line number Diff line
@@ -203,11 +203,18 @@ func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.Mo
func (b *platformBootclasspathModule) generateClasspathProtoBuildActions(ctx android.ModuleContext) {
	// ART and platform boot jars must have a corresponding entry in 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)
}

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