summaryrefslogtreecommitdiff
path: root/src/python/m5/main.py
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-08-02 15:38:06 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-08-02 15:38:06 -0400
commit31a9114a3d449c41a796bc26cce5dce86a4d1b15 (patch)
treee98c2fbbd384fb95c68c2867677363e1639509a6 /src/python/m5/main.py
parentda5f62af7bdc4a0a6c8da1eee61b0ecb1a7212b4 (diff)
parentdfa147a70ac87cdc5804993a0b39dfb8bb4cfa1b (diff)
downloadgem5-31a9114a3d449c41a796bc26cce5dce86a4d1b15.tar.xz
merge, no manual changes
--HG-- extra : convert_revision : 8504bddf1f73a4186cebc03c3e52e42ea38361fc
Diffstat (limited to 'src/python/m5/main.py')
-rw-r--r--src/python/m5/main.py30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/python/m5/main.py b/src/python/m5/main.py
index 1695ed75f..96f017cb0 100644
--- a/src/python/m5/main.py
+++ b/src/python/m5/main.py
@@ -26,9 +26,15 @@
#
# Authors: Nathan Binkert
-import code, optparse, os, socket, sys
-from datetime import datetime
+import code
+import datetime
+import optparse
+import os
+import socket
+import sys
+
from attrdict import attrdict
+import defines
import traceflags
__all__ = [ 'options', 'arguments', 'main' ]
@@ -116,6 +122,8 @@ def bool_option(name, default, help):
# Help options
add_option('-A', "--authors", action="store_true", default=False,
help="Show author information")
+add_option('-B', "--build-info", action="store_true", default=False,
+ help="Show build information")
add_option('-C', "--copyright", action="store_true", default=False,
help="Show full copyright information")
add_option('-R', "--readme", action="store_true", default=False,
@@ -195,6 +203,22 @@ def main():
parse_args()
done = False
+
+ if options.build_info:
+ done = True
+ print 'Build information:'
+ print
+ print 'compiled %s' % internal.core.cvar.compileDate;
+ print 'started %s' % datetime.datetime.now().ctime()
+ print 'executing on %s' % socket.gethostname()
+ print 'build options:'
+ keys = defines.m5_build_env.keys()
+ keys.sort()
+ for key in keys:
+ val = defines.m5_build_env[key]
+ print ' %s = %s' % (key, val)
+ print
+
if options.copyright:
done = True
print info.LICENSE
@@ -242,7 +266,7 @@ def main():
print brief_copyright
print
print "M5 compiled %s" % internal.core.cvar.compileDate;
- print "M5 started %s" % datetime.now().ctime()
+ print "M5 started %s" % datetime.datetime.now().ctime()
print "M5 executing on %s" % socket.gethostname()
print "command line:",
for argv in sys.argv: