Merge "Fix profileCommand to remove the profile first." am: 8e4cd8883a

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689753

Change-Id: I4be2352e65fc8eaa4c2d394dc0c6f16b5944a6d8
This commit is contained in:
Vladimir Marko 2021-04-29 14:51:30 +00:00 committed by Automerger Merge Worker
commit 9f8079dc42
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().