Separate dexpreopt.GlobalSoongConfig to allow independent caching of
it. Introduce a Once cache for GlobalSoongConfig to allow it to get binary tool paths from ordinary module dependencies (coming in a future CL) that are then reused in singletons. Bug: 145934348 Test: m Change-Id: I440a09dba7d337965a196527566b0966a18e3653
This commit is contained in:
@@ -104,6 +104,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
|
||||
return dexJarFile
|
||||
}
|
||||
|
||||
globalSoong := dexpreopt.GetGlobalSoongConfig(ctx)
|
||||
global := dexpreoptGlobalConfig(ctx)
|
||||
bootImage := defaultBootImageConfig(ctx)
|
||||
if global.UseApexImage {
|
||||
@@ -189,7 +190,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
|
||||
PresignedPrebuilt: d.isPresignedPrebuilt,
|
||||
}
|
||||
|
||||
dexpreoptRule, err := dexpreopt.GenerateDexpreoptRule(ctx, global, dexpreoptConfig)
|
||||
dexpreoptRule, err := dexpreopt.GenerateDexpreoptRule(ctx, globalSoong, global, dexpreoptConfig)
|
||||
if err != nil {
|
||||
ctx.ModuleErrorf("error generating dexpreopt rule: %s", err.Error())
|
||||
return dexJarFile
|
||||
|
Reference in New Issue
Block a user