Commit e186e50d authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Update post_build_ninja_summary.py for Linux

post_build_ninja_summary.py gives a summary of a ninja build. It can be
run standalone or it can be run automatically by autoninja. This CL
updates the Python script and the autoninja bash script to make this
work on Linux. This includes removing a zero-value assert, and ensuring
that .so files get categorized as such.

Change-Id: I2d59ab129f5ce70117beeb119719f8432bfbab7c
Reviewed-on: https://chromium-review.googlesource.com/915053Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent 1853f66e
......@@ -9,4 +9,8 @@
# Also print it to reassure that the right settings are being used.
command=$(python $(dirname -- "$0")/autoninja.py "$@")
echo $command
exec $command
$command
if [ $? -eq 0 ] && [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then
python $(dirname -- "$0")/post_build_ninja_summary.py $@
fi
......@@ -7,7 +7,11 @@
This script is designed to be automatically run after each ninja build in
order to summarize the build's performance. Making build performance information
more visible should make it easier to notice anomalies and opportunities. To use
this script just set NINJA_SUMMARIZE_BUILD=1 and run autoninja.bat.
this script on Windows just set NINJA_SUMMARIZE_BUILD=1 and run autoninja.bat.
On Linux you can get autoninja to invoke this script using this syntax:
$ NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default/ chrome
You can also call this script directly using ninja's syntax to specify the
output directory of interest:
......@@ -159,13 +163,15 @@ def GetExtension(target):
extension = os.path.splitext(output)[1]
if len(extension) == 0:
extension = '(no extension found)'
# AHEM____.TTF fails this check.
assert(extension == extension.lower() or extension == '.TTF')
if extension in ['.pdb', '.dll', '.exe']:
extension = 'PEFile (linking)'
# Make sure that .dll and .exe are grouped together and that the
# .dll.lib files don't cause these to be listed as libraries
break
if extension in ['.so', '.TOC']:
extension = '.so (linking)'
# Attempt to identify linking, avoid identifying as '.TOC'
break
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