From 1eb16f67982b134323bd89c9f639ba1908700b88 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Fri, 21 Feb 2020 16:56:35 +0000 Subject: [PATCH] Fix build summary to classify *.mojom*.obj as .obj The build summary script was overly aggressive about summarizing .mojom files under the mojo category. This was intended to measure the cost of generating source from mojo files but it accidentally pulled in the .mojom object files. Categorizing different types of object files might be worthwhile but that should be done intentionally and consistently. Change-Id: Iab6b7e94797ce7f1ed46805034b4f274c88617e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2067647 Commit-Queue: Aaron Gable Auto-Submit: Bruce Dawson Reviewed-by: Aaron Gable --- post_build_ninja_summary.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/post_build_ninja_summary.py b/post_build_ninja_summary.py index aa7e957c50..b55a93b3b7 100644 --- a/post_build_ninja_summary.py +++ b/post_build_ninja_summary.py @@ -170,10 +170,6 @@ def GetExtension(target): consistent 'canonical' extension. Ultimately the goal is to group build steps by type.""" for output in target.targets: - # Normalize all mojo related outputs to 'mojo'. - if output.count('.mojom') > 0: - extension = 'mojo' - break # Not a true extension, but a good grouping. if output.endswith('type_mappings'): extension = 'type_mappings' @@ -190,6 +186,13 @@ def GetExtension(target): extension = '.so (linking)' # Attempt to identify linking, avoid identifying as '.TOC' break + # Make sure .obj files don't get categorized as mojo files + if extension in ['.obj', '.o']: + break + # Normalize all mojo related outputs to 'mojo'. + if output.count('.mojom') > 0: + extension = 'mojo' + break return extension