diff options
| author | 2021-02-17 13:22:03 -0500 | |
|---|---|---|
| committer | 2021-03-15 13:09:25 -0400 | |
| commit | ba3ea16f14eb1017fd75aead089ca34b6f32406b (patch) | |
| tree | 57158b4cdf73362469cf120ce3cd28f80a5f4043 /bp2build/metrics.go | |
| parent | ca5e611e0af6024892e9ca4f0de0d44e557d4944 (diff) | |
Use handcrafted build targets in bp2build
If both bp2build_available and label are specified, label will be
preferred.
Initially, we copy the entire BUILD.bazel file. Eventually we may move
this to use bazel query for a more accurate result.
Test: go test *
Test: build/bazel/scripts/milestone-2/demo.sh full
Test: GENERATE_BAZEL_FILES=true m nothing
edit bionic/libc/tools/BUILD.bazel
GENERATE_BAZEL_FILES=true m nothing and verify changes picked up
Bug: 180516554
Change-Id: I43025583300e6b10d2c18032cd4a76237b578d59
Diffstat (limited to 'bp2build/metrics.go')
| -rw-r--r-- | bp2build/metrics.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bp2build/metrics.go b/bp2build/metrics.go index 916129fba..65b06c636 100644 --- a/bp2build/metrics.go +++ b/bp2build/metrics.go @@ -13,6 +13,9 @@ type CodegenMetrics struct { // Counts of generated Bazel targets per Bazel rule class RuleClassCount map[string]int + + // Total number of handcrafted targets + handCraftedTargetCount int } // Print the codegen metrics to stdout. @@ -24,7 +27,8 @@ func (metrics CodegenMetrics) Print() { generatedTargetCount += count } fmt.Printf( - "[bp2build] Generated %d total BUILD targets from %d Android.bp modules.\n", + "[bp2build] Generated %d total BUILD targets and included %d handcrafted BUILD targets from %d Android.bp modules.\n", generatedTargetCount, + metrics.handCraftedTargetCount, metrics.TotalModuleCount) } |