util: Pass TERM through to commands in the m5 util's scons.
authorGabe Black <gabe.black@gmail.com>
Fri, 23 Oct 2020 03:00:48 +0000 (20:00 -0700)
committerGabe Black <gabe.black@gmail.com>
Fri, 4 Dec 2020 06:30:06 +0000 (06:30 +0000)
This enables color output from commands since they can detect that the
terminal supports it.

Change-Id: I4bbf400dccb8c6bfe92459a9db812e06e5a69b5a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27754
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Pouya Fotouhi <pfotouhi@ucdavis.edu>
util/m5/SConstruct

index 8462cab696d04ef242662a5d28561a698c11e702..3a96103aea20627d90f5b0325b3447f6e080a9d8 100644 (file)
@@ -56,6 +56,8 @@ main.Append(CPPPATH=[ common_include ])
 
 # Propogate the environment's PATH setting.
 main['ENV']['PATH'] = os.environ['PATH']
+# Pass through terminal information to, for instance, enable color output.
+main['ENV']['TERM'] = os.environ['TERM']
 
 # Detect some dependencies of some forms of the m5 utility/library.
 main['HAVE_JAVA'] = all(key in main for key in ('JAVAC', 'JAR'))