diff options
Diffstat (limited to 'ui/build/config.go')
-rw-r--r-- | ui/build/config.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ui/build/config.go b/ui/build/config.go index 1dd948ce5..077a4d199 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -35,10 +35,10 @@ import ( ) const ( - envConfigDir = "vendor/google/tools/soong_config" - jsonSuffix = "json" + envConfigDir = "vendor/google/tools/soong_config" + jsonSuffix = "json" - configFetcher = "vendor/google/tools/soong/expconfigfetcher" + configFetcher = "vendor/google/tools/soong/expconfigfetcher" envConfigFetchTimeout = 10 * time.Second ) @@ -62,6 +62,7 @@ type configImpl struct { jsonModuleGraph bool bp2build bool queryview bool + reportMkMetrics bool // Collect and report mk2bp migration progress metrics. soongDocs bool skipConfig bool skipKati bool @@ -155,7 +156,7 @@ func fetchEnvConfig(ctx Context, config *configImpl, envConfigName string) error } configExists := false - outConfigFilePath := filepath.Join(config.OutDir(), envConfigName + jsonSuffix) + outConfigFilePath := filepath.Join(config.OutDir(), envConfigName+jsonSuffix) if _, err := os.Stat(outConfigFilePath); err == nil { configExists = true } @@ -711,6 +712,8 @@ func (c *configImpl) parseArgs(ctx Context, args []string) { c.skipConfig = true } else if arg == "--skip-soong-tests" { c.skipSoongTests = true + } else if arg == "--mk-metrics" { + c.reportMkMetrics = true } else if len(arg) > 0 && arg[0] == '-' { parseArgNum := func(def int) int { if len(arg) > 2 { @@ -1381,6 +1384,11 @@ func (c *configImpl) BazelMetricsDir() string { return filepath.Join(c.LogsDir(), "bazel_metrics") } +// MkFileMetrics returns the file path for make-related metrics. +func (c *configImpl) MkMetrics() string { + return filepath.Join(c.LogsDir(), "mk_metrics.pb") +} + func (c *configImpl) SetEmptyNinjaFile(v bool) { c.emptyNinjaFile = v } |