Get rid of DeviceName() from path related to dexpreopt

As-is, dexpreopt config and bootjar is in the dir including
DeviceName(). It causes unnecessary dexpreopt invocation when target is
changed repeatly. To avoid it, rename dir to common name.

Bug: 278833696
Test: m
Change-Id: I2818d9ae09e6c22ca6989cc8efdb70b470ec502c
This commit is contained in:
Jeongik Cha
2023-04-19 23:25:41 +09:00
parent aea34a38ca
commit 4753b39cca
5 changed files with 313 additions and 308 deletions

View File

@@ -507,8 +507,8 @@ func (d *dexpreoptBootJars) GenerateSingletonBuildActions(ctx android.SingletonC
// No module has enabled dexpreopting, so we assume there will be no boot image to make.
return
}
d.dexpreoptConfigForMake = android.PathForOutput(ctx, ctx.Config().DeviceName(), "dexpreopt.config")
archType := ctx.Config().Targets[android.Android][0].Arch.ArchType
d.dexpreoptConfigForMake = android.PathForOutput(ctx, toDexpreoptDirName(archType), "dexpreopt.config")
writeGlobalConfigForMake(ctx, d.dexpreoptConfigForMake)
global := dexpreopt.GetGlobalConfig(ctx)