Remove special handling of frameworks/base/config/boot-profile.txt
Previously, the method was run in repo manifests that did not include the frameworks/base repository so it had to handle the file being missing. However, now that this is being called from platform_bootclasspath which is only defined in frameworks/base that is no longer required. Bug: 177892522 Test: m droid Change-Id: I77fa5a204d1426a6be24a6f0b48e18f48f3dd908
This commit is contained in:
@@ -865,24 +865,12 @@ func bootFrameworkProfileRule(ctx android.ModuleContext, image *bootImageConfig)
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some branches like master-art-host don't have frameworks/base, so manually
|
|
||||||
// handle the case that the default is missing. Those branches won't attempt to build the profile rule,
|
|
||||||
// and if they do they'll get a missing deps error.
|
|
||||||
defaultProfile := "frameworks/base/config/boot-profile.txt"
|
defaultProfile := "frameworks/base/config/boot-profile.txt"
|
||||||
path := android.ExistentPathForSource(ctx, defaultProfile)
|
bootFrameworkProfile := android.PathForSource(ctx, defaultProfile)
|
||||||
var bootFrameworkProfile android.Path
|
|
||||||
var missingDeps []string
|
|
||||||
if path.Valid() {
|
|
||||||
bootFrameworkProfile = path.Path()
|
|
||||||
} else {
|
|
||||||
missingDeps = append(missingDeps, defaultProfile)
|
|
||||||
bootFrameworkProfile = android.PathForOutput(ctx, "missing", defaultProfile)
|
|
||||||
}
|
|
||||||
|
|
||||||
profile := image.dir.Join(ctx, "boot.bprof")
|
profile := image.dir.Join(ctx, "boot.bprof")
|
||||||
|
|
||||||
rule := android.NewRuleBuilder(pctx, ctx)
|
rule := android.NewRuleBuilder(pctx, ctx)
|
||||||
rule.MissingDeps(missingDeps)
|
|
||||||
rule.Command().
|
rule.Command().
|
||||||
Text(`ANDROID_LOG_TAGS="*:e"`).
|
Text(`ANDROID_LOG_TAGS="*:e"`).
|
||||||
Tool(globalSoong.Profman).
|
Tool(globalSoong.Profman).
|
||||||
|
@@ -46,6 +46,8 @@ func TestSnapshotWithBootclasspathFragment_ImageName(t *testing.T) {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
|
// Needed for platform_bootclasspath
|
||||||
|
android.FixtureAddFile("frameworks/base/config/boot-profile.txt", nil),
|
||||||
|
|
||||||
java.FixtureConfigureBootJars("com.android.art:mybootlib"),
|
java.FixtureConfigureBootJars("com.android.art:mybootlib"),
|
||||||
android.FixtureWithRootAndroidBp(`
|
android.FixtureWithRootAndroidBp(`
|
||||||
|
Reference in New Issue
Block a user