From 1c59559ddb8be4fbad2c0e730df24f497c510283 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 26 Mar 2020 04:48:53 -0700 Subject: [PATCH] scons: Call summarize_warnings() when scons finishes building. 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 Reviewed-by: Gabe Black Maintainer: Gabe Black --- SConstruct | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 8d5ac5748..8be1ced46 100755 --- a/SConstruct +++ b/SConstruct @@ -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) -- 2.30.2