bloaty: Append new file extension

When measuring the sections of a binary, the file extension of the
output was replaced. Append the new extension instead, to preserve the
full name of the file measured.

Test: m out/soong/binary_sizes.pb
Change-Id: I4c7b5cf1be3bdce858a7cc72f278ddada0425898
This commit is contained in:
Thiébaud Weksteen 2021-03-29 11:26:18 +02:00
parent cf7f2e0a9e
commit 55d6b3edbd
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ import (
"github.com/google/blueprint"
)
const bloatyDescriptorExt = "bloaty.csv"
const bloatyDescriptorExt = ".bloaty.csv"
const protoFilename = "binary_sizes.pb"
var (
@ -75,7 +75,7 @@ func (singleton *sizesSingleton) GenerateBuildActions(ctx android.SingletonConte
return
}
filePath := ctx.ModuleProvider(m, fileSizeMeasurerKey).(android.ModuleOutPath)
sizeFile := filePath.ReplaceExtension(ctx, bloatyDescriptorExt)
sizeFile := filePath.InSameDir(ctx, filePath.Base()+bloatyDescriptorExt)
ctx.Build(pctx, android.BuildParams{
Rule: bloaty,
Description: "bloaty " + filePath.Rel(),