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

Commit 242d9ed1 authored by Martin Stjernholm's avatar Martin Stjernholm Committed by android-build-merger
Browse files

Update dexpreopt for the ART APEX name change.

am: cc4b0ad7

Change-Id: I925557842275381d5a8754771a39cf72821628f0
parents 19dd886e cc4b0ad7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ func (c *Module) AndroidMk() android.AndroidMkData {
		OutputFile: c.outputFile,
		// TODO(jiyong): add the APEXes providing shared libs to the required modules
		// Currently, adding c.Properties.ApexesProvidingSharedLibs is causing multiple
		// runtime APEXes (com.android.runtime.debug|release) to be installed. And this
		// ART APEXes (com.android.art.debug|release) to be installed. And this
		// is breaking some older devices (like marlin) where system.img is small.
		Required: c.Properties.AndroidMkRuntimeLibs,
		Include:  "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk",
+2 −2
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ type GlobalConfig struct {

	BootJars []string // modules for jars that form the boot class path

	RuntimeApexJars               []string // modules for jars that are in the runtime apex
	ArtApexJars                   []string // modules for jars that are in the ART APEX
	ProductUpdatableBootModules   []string
	ProductUpdatableBootLocations []string

@@ -292,7 +292,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig {
		DisableGenerateProfile:             false,
		ProfileDir:                         "",
		BootJars:                           nil,
		RuntimeApexJars:                    nil,
		ArtApexJars:                        nil,
		ProductUpdatableBootModules:        nil,
		ProductUpdatableBootLocations:      nil,
		SystemServerJars:                   nil,
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ func TestDexpreoptBootJars(t *testing.T) {

	pathCtx := android.PathContextForTesting(config, nil)
	dexpreoptConfig := dexpreopt.GlobalConfigForTests(pathCtx)
	dexpreoptConfig.RuntimeApexJars = []string{"foo", "bar", "baz"}
	dexpreoptConfig.ArtApexJars = []string{"foo", "bar", "baz"}
	setDexpreoptTestGlobalConfig(config, dexpreoptConfig)

	ctx := testContext(bp, nil)
+9 −9
Original line number Diff line number Diff line
@@ -107,17 +107,17 @@ func defaultBootImageConfig(ctx android.PathContext) bootImageConfig {
	return ctx.Config().Once(defaultBootImageConfigKey, func() interface{} {
		global := dexpreoptGlobalConfig(ctx)

		runtimeModules := global.RuntimeApexJars
		nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules)
		artModules := global.ArtApexJars
		nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules)
		frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)

		var nonUpdatableBootModules []string
		var nonUpdatableBootLocations []string

		for _, m := range runtimeModules {
		for _, m := range artModules {
			nonUpdatableBootModules = append(nonUpdatableBootModules, m)
			nonUpdatableBootLocations = append(nonUpdatableBootLocations,
				filepath.Join("/apex/com.android.runtime/javalib", m+".jar"))
				filepath.Join("/apex/com.android.art/javalib", m+".jar"))
		}

		for _, m := range frameworkModules {
@@ -176,16 +176,16 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
	return ctx.Config().Once(apexBootImageConfigKey, func() interface{} {
		global := dexpreoptGlobalConfig(ctx)

		runtimeModules := global.RuntimeApexJars
		nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules)
		artModules := global.ArtApexJars
		nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules)
		frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)
		imageModules := concat(runtimeModules, frameworkModules)
		imageModules := concat(artModules, frameworkModules)

		var bootLocations []string

		for _, m := range runtimeModules {
		for _, m := range artModules {
			bootLocations = append(bootLocations,
				filepath.Join("/apex/com.android.runtime/javalib", m+".jar"))
				filepath.Join("/apex/com.android.art/javalib", m+".jar"))
		}

		for _, m := range frameworkModules {