Use correct path for soong_build_metrics.pb when dist is enabled

When dist is enabled soong_build_metrics.pb is written to $DIST_DIR/logs,
not $OUT_DIR.

Test: m dist nothing, examine out/dist/logs/bulid.trace.gz
Change-Id: Ia41de6c838ecbcf0acca1e7ec7e68ba24dce2b32
This commit is contained in:
Colin Cross 2023-10-31 10:02:45 -07:00
parent 78567011cf
commit b67b061baa
2 changed files with 2 additions and 2 deletions

View file

@ -1530,7 +1530,7 @@ func (c *configImpl) SoongMakeVarsMk() string {
}
func (c *configImpl) SoongBuildMetrics() string {
return filepath.Join(c.OutDir(), "soong_build_metrics.pb")
return filepath.Join(c.LogsDir(), "soong_build_metrics.pb")
}
func (c *configImpl) ProductOut() string {

View file

@ -759,7 +759,7 @@ func loadSoongBuildMetrics(ctx Context, config Config, oldTimestamp time.Time) {
return
}
metricsData, err := os.ReadFile(config.SoongBuildMetrics())
metricsData, err := os.ReadFile(soongBuildMetricsFile)
if err != nil {
ctx.Verbosef("Failed to read %s: %s", soongBuildMetricsFile, err)
return