summaryrefslogtreecommitdiff
path: root/java/dexpreopt_bootjars.go
diff options
context:
space:
mode:
author Islam Elbanna <islamelbanna@google.com> 2024-09-24 15:36:14 +0000
committer Islam Elbanna <islamelbanna@google.com> 2024-09-30 08:46:09 +0000
commit5351cf28d28cac5a585ab93a63f17c59a2d80ba4 (patch)
treeb62c938f5dac44c563fd5682bd1ec132e53e090d /java/dexpreopt_bootjars.go
parent43b2454eee86e543f901db6ea77d90673fd77adc (diff)
Use profile at framework/base/boot/ instead of the combined one at
framework/base/config This is to decouple the framework and art profiles everywhere. Bug: 260067246 Change-Id: I3bd3ef6397a4587e28d3cd1775f1714dbf846c76 Test: running `m` Test: Verify PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION for multiple products https://paste.googleplex.com/5573555023773696
Diffstat (limited to 'java/dexpreopt_bootjars.go')
-rw-r--r--java/dexpreopt_bootjars.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 7a77b1596..5c69ff151 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -1217,8 +1217,13 @@ func bootImageProfileRuleCommon(ctx android.ModuleContext, name string, dexFiles
return nil
}
- defaultProfile := "frameworks/base/config/boot-image-profile.txt"
- extraProfile := "frameworks/base/config/boot-image-profile-extra.txt"
+ defaultProfile := "frameworks/base/boot/boot-image-profile.txt"
+ // If ART is prebuilt, primarily in next release configs, this will still use
+ // the profile from source which represent the latest code, so it may not
+ // correspond to the BCP jars in the prebuilt APEX, but this is the profile we
+ // have access to.
+ artProfile := "art/build/boot/boot-image-profile.txt"
+ extraProfile := "frameworks/base/boot/boot-image-profile-extra.txt"
rule := android.NewRuleBuilder(pctx, ctx)
@@ -1233,6 +1238,9 @@ func bootImageProfileRuleCommon(ctx android.ModuleContext, name string, dexFiles
// Return nil and continue without profile.
return nil
}
+ if path := android.ExistentPathForSource(ctx, artProfile); path.Valid() {
+ profiles = append(profiles, path.Path())
+ }
if path := android.ExistentPathForSource(ctx, extraProfile); path.Valid() {
profiles = append(profiles, path.Path())
}
@@ -1290,7 +1298,7 @@ func bootFrameworkProfileRule(ctx android.ModuleContext, image *bootImageConfig)
return nil, nil
}
- defaultProfile := "frameworks/base/config/boot-profile.txt"
+ defaultProfile := "frameworks/base/boot/boot-profile.txt"
bootFrameworkProfile := android.PathForSource(ctx, defaultProfile)
profile := image.dir.Join(ctx, "boot.bprof")