From 55d6b3edbd511dc951b73e9c4929dfef89773eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thi=C3=A9baud=20Weksteen?= Date: Mon, 29 Mar 2021 11:26:18 +0200 Subject: [PATCH] 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 --- bloaty/bloaty.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bloaty/bloaty.go b/bloaty/bloaty.go index 21bf4acf1..653c4890a 100644 --- a/bloaty/bloaty.go +++ b/bloaty/bloaty.go @@ -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(),