diff options
author | 2024-09-24 15:36:14 +0000 | |
---|---|---|
committer | 2024-09-30 08:46:09 +0000 | |
commit | 5351cf28d28cac5a585ab93a63f17c59a2d80ba4 (patch) | |
tree | b62c938f5dac44c563fd5682bd1ec132e53e090d | |
parent | 43b2454eee86e543f901db6ea77d90673fd77adc (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
-rw-r--r-- | apex/apex_test.go | 2 | ||||
-rw-r--r-- | java/dexpreopt_bootjars.go | 14 | ||||
-rw-r--r-- | sdk/bootclasspath_fragment_sdk_test.go | 5 |
3 files changed, 15 insertions, 6 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 7465f40eb..ec222afc4 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -5450,7 +5450,7 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) { 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 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") diff --git a/sdk/bootclasspath_fragment_sdk_test.go b/sdk/bootclasspath_fragment_sdk_test.go index 39c81235e..34e11f0da 100644 --- a/sdk/bootclasspath_fragment_sdk_test.go +++ b/sdk/bootclasspath_fragment_sdk_test.go @@ -46,8 +46,9 @@ func fixtureAddPlatformBootclasspathForBootclasspathFragmentWithExtra(apex, frag ], } `, 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), ) } |