Fix profileCommand to remove the profile first.
This fixes a discrepancy between clean and incremental builds exposed by https://android-review.googlesource.com/1671710 . Test: m Bug: 148067697 Change-Id: I0de078045075417a4123f7c3821c723f1e8e6b68
This commit is contained in:
@@ -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().
|
||||
|
Reference in New Issue
Block a user