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
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 7465f40..ec222af 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -5450,7 +5450,7 @@
android.PrepareForTestWithAllowMissingDependencies,
android.FixtureMergeMockFs(map[string][]byte{
"build/soong/scripts/check_boot_jars/package_allowed_list.txt": nil,
- "frameworks/base/config/boot-profile.txt": nil,
+ "frameworks/base/boot/boot-profile.txt": nil,
}),
)
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 7a77b15..5c69ff1 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -1217,8 +1217,13 @@
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 @@
// 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 @@
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")
diff --git a/sdk/bootclasspath_fragment_sdk_test.go b/sdk/bootclasspath_fragment_sdk_test.go
index 39c8123..34e11f0 100644
--- a/sdk/bootclasspath_fragment_sdk_test.go
+++ b/sdk/bootclasspath_fragment_sdk_test.go
@@ -46,8 +46,9 @@
],
}
`, apex, fragment, extraFragments)),
- android.FixtureAddFile("frameworks/base/config/boot-profile.txt", nil),
- android.FixtureAddFile("frameworks/base/config/boot-image-profile.txt", nil),
+ android.FixtureAddFile("frameworks/base/boot/boot-profile.txt", nil),
+ android.FixtureAddFile("frameworks/base/boot/boot-image-profile.txt", nil),
+ android.FixtureAddFile("art/build/boot/boot-image-profile.txt", nil),
android.FixtureAddFile("build/soong/scripts/check_boot_jars/package_allowed_list.txt", nil),
)
}