Commit 1eb16f67 authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

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 <agable@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
parent 7e4c38a4
...@@ -170,10 +170,6 @@ def GetExtension(target): ...@@ -170,10 +170,6 @@ def GetExtension(target):
consistent 'canonical' extension. Ultimately the goal is to group build steps consistent 'canonical' extension. Ultimately the goal is to group build steps
by type.""" by type."""
for output in target.targets: 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. # Not a true extension, but a good grouping.
if output.endswith('type_mappings'): if output.endswith('type_mappings'):
extension = 'type_mappings' extension = 'type_mappings'
...@@ -190,6 +186,13 @@ def GetExtension(target): ...@@ -190,6 +186,13 @@ def GetExtension(target):
extension = '.so (linking)' extension = '.so (linking)'
# Attempt to identify linking, avoid identifying as '.TOC' # Attempt to identify linking, avoid identifying as '.TOC'
break 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 return extension
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment