aboutsummaryrefslogtreecommitdiffstats
path: root/java/dexpreopt_bootjars.go
diff options
context:
space:
mode:
authorMartin Stjernholm <mast@google.com>2020-01-20 18:12:23 +0000
committerMartin Stjernholm <mast@google.com>2020-01-24 22:18:42 +0000
commitdae8a8042648db84af3720be97845636a2dd57c6 (patch)
tree07187997353e499ee41f960b2de9ab62b857ed9c /java/dexpreopt_bootjars.go
parentbe9d0d21d1293e022499242b54ea52d5d79a1dfb (diff)
downloadbuild_soong-dae8a8042648db84af3720be97845636a2dd57c6.tar.gz
build_soong-dae8a8042648db84af3720be97845636a2dd57c6.tar.bz2
build_soong-dae8a8042648db84af3720be97845636a2dd57c6.zip
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. Bug: 145934348 Test: m Change-Id: I71df11c1e042ca8135d273a7263e9539ea3cd68f
Diffstat (limited to 'java/dexpreopt_bootjars.go')
-rw-r--r--java/dexpreopt_bootjars.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index a497b08f..0082d038 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -162,7 +162,7 @@ func dexpreoptBootJarsFactory() android.Singleton {
}
func skipDexpreoptBootJars(ctx android.PathContext) bool {
- if dexpreoptGlobalConfig(ctx).DisablePreopt {
+ if dexpreopt.GetGlobalConfig(ctx).DisablePreopt {
return true
}
@@ -195,7 +195,7 @@ func DexpreoptedArtApexJars(ctx android.BuilderContext) map[android.ArchType]and
files := artBootImageConfig(ctx).imagesDeps
// For JIT-zygote config, also include dexpreopt files for the primary JIT-zygote image.
- if dexpreoptGlobalConfig(ctx).UseApexImage {
+ if dexpreopt.GetGlobalConfig(ctx).UseApexImage {
for arch, paths := range artJZBootImageConfig(ctx).imagesDeps {
files[arch] = append(files[arch], paths...)
}
@@ -213,7 +213,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.
@@ -305,7 +305,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")
@@ -444,7 +444,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
@@ -499,7 +499,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
@@ -587,7 +587,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,