Enable bazel metrics from ninja build. am: 18cb70d645

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498204

Change-Id: Ied5eff56e861052efcabef1732affec0a69968c7
This commit is contained in:
Patrice Arruda 2020-11-14 01:43:34 +00:00 committed by Automerger Merge Worker
commit 9bfa4625c2

View file

@ -19,6 +19,8 @@ import (
"os"
"path/filepath"
"strings"
"android/soong/shared"
)
func runBazel(ctx Context, config Config) {
@ -45,9 +47,12 @@ func runBazel(ctx Context, config Config) {
cmd.Args = append(cmd.Args, strings.Fields(extra_startup_args)...)
}
actionName := "build"
cmd.Args = append(cmd.Args,
"build",
actionName,
"--output_groups="+outputGroups,
"--profile="+filepath.Join(shared.BazelMetricsFilename(config.OutDir(), actionName)),
"--slim_profile=true",
)
if extra_build_args, ok := cmd.Environment.Get("BAZEL_BUILD_ARGS"); ok {