Reland: Move the Once cache for dexpreopt.GlobalConfig into the
dexpreopt package. Preparation for a future CL that will need to get the make-written GlobalConfig from within dexpreopt. Also rename the Load*Config functions to Parse*Config, since they don't actually load the config files anymore. This relands https://r.android.com/1211982. Bug: 145934348 Test: m Change-Id: Icb9332a93811d77d2d8b06e983b92501b180a358
This commit is contained in:
@@ -165,7 +165,7 @@ func dexpreoptBootJarsFactory() android.Singleton {
|
||||
}
|
||||
|
||||
func skipDexpreoptBootJars(ctx android.PathContext) bool {
|
||||
if dexpreoptGlobalConfig(ctx).DisablePreopt {
|
||||
if dexpreopt.GetGlobalConfig(ctx).DisablePreopt {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ func (d *dexpreoptBootJars) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
d.dexpreoptConfigForMake = android.PathForOutput(ctx, ctx.Config().DeviceName(), "dexpreopt.config")
|
||||
writeGlobalConfigForMake(ctx, d.dexpreoptConfigForMake)
|
||||
|
||||
global := dexpreoptGlobalConfig(ctx)
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
// Skip recompiling the boot image for the second sanitization phase. We'll get separate paths
|
||||
// and invalidate first-stage artifacts which are crucial to SANITIZE_LITE builds.
|
||||
@@ -296,7 +296,7 @@ func buildBootImageRuleForArch(ctx android.SingletonContext, image *bootImage,
|
||||
arch android.ArchType, profile android.Path, missingDeps []string) android.WritablePaths {
|
||||
|
||||
globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx)
|
||||
global := dexpreoptGlobalConfig(ctx)
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
symbolsDir := image.symbolsDir.Join(ctx, image.installSubdir, arch.String())
|
||||
symbolsFile := symbolsDir.Join(ctx, image.stem+".oat")
|
||||
@@ -435,7 +435,7 @@ Rebuild with ART_BOOT_IMAGE_EXTRA_ARGS="--runtime-arg -verbose:verifier" to see
|
||||
|
||||
func bootImageProfileRule(ctx android.SingletonContext, image *bootImage, missingDeps []string) android.WritablePath {
|
||||
globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx)
|
||||
global := dexpreoptGlobalConfig(ctx)
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
if global.DisableGenerateProfile || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() {
|
||||
return nil
|
||||
@@ -490,7 +490,7 @@ var bootImageProfileRuleKey = android.NewOnceKey("bootImageProfileRule")
|
||||
|
||||
func bootFrameworkProfileRule(ctx android.SingletonContext, image *bootImage, missingDeps []string) android.WritablePath {
|
||||
globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx)
|
||||
global := dexpreoptGlobalConfig(ctx)
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
if global.DisableGenerateProfile || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() {
|
||||
return nil
|
||||
@@ -578,7 +578,7 @@ func dumpOatRules(ctx android.SingletonContext, image *bootImage) {
|
||||
}
|
||||
|
||||
func writeGlobalConfigForMake(ctx android.SingletonContext, path android.WritablePath) {
|
||||
data := dexpreoptGlobalConfigRaw(ctx).data
|
||||
data := dexpreopt.GetGlobalConfigRawData(ctx)
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: android.WriteFile,
|
||||
|
Reference in New Issue
Block a user