Merge "Fix profileCommand to remove the profile first."

This commit is contained in:
Vladimir Marko 2021-04-29 14:24:00 +00:00 committed by Gerrit Code Review
commit 8e4cd8883a
1 changed files with 4 additions and 2 deletions

View File

@ -134,7 +134,8 @@ func profileCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig, glo
profileInstalledPath := module.DexLocation + ".prof"
if !module.ProfileIsTextListing {
rule.Command().FlagWithOutput("touch ", profilePath)
rule.Command().Text("rm -f").Output(profilePath)
rule.Command().Text("touch").Output(profilePath)
}
cmd := rule.Command().
@ -174,7 +175,8 @@ func bootProfileCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig,
profileInstalledPath := module.DexLocation + ".bprof"
if !module.ProfileIsTextListing {
rule.Command().FlagWithOutput("touch ", profilePath)
rule.Command().Text("rm -f").Output(profilePath)
rule.Command().Text("touch").Output(profilePath)
}
cmd := rule.Command().