scons: Call summarize_warnings() when scons finishes building.
authorGabe Black <gabe.black@gmail.com>
Thu, 26 Mar 2020 11:48:53 +0000 (04:48 -0700)
committerGabe Black <gabeblack@google.com>
Sat, 28 Mar 2020 00:12:19 +0000 (00:12 +0000)
This will ensure that warnings are not all shoved off the end of the
scrollback buffer or lost in a sea of compiler lines, and that the user
will actually have a chance to see and read them.

Change-Id: I7129560482ebca903ec597f8b1cf8a9a84d98c9c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27130
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

SConstruct

index 8d5ac57482d663d1ffced1279840148adc012d29..8be1ced46e7f02728e45092f658b4a3cefae08fc 100755 (executable)
@@ -78,6 +78,7 @@
 from __future__ import print_function
 
 # Global Python includes
+import atexit
 import itertools
 import os
 import re
@@ -168,7 +169,7 @@ AddLocalOption('--with-asan', dest='with_asan', action='store_true',
 AddLocalOption('--with-systemc-tests', dest='with_systemc_tests',
                action='store_true', help='Build systemc tests')
 
-from gem5_scons import Transform, error, warning
+from gem5_scons import Transform, error, warning, summarize_warnings
 
 if GetOption('no_lto') and GetOption('force_lto'):
     error('--no-lto and --force-lto are mutually exclusive')
@@ -1274,3 +1275,5 @@ Global build variables:
 
 %(local_vars)s
 ''' % help_texts)
+
+atexit.register(summarize_warnings)