summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-06-14 21:16:00 -0700
committerNathan Binkert <nate@binkert.org>2008-06-14 21:16:00 -0700
commitbbeb8082a56b765181b769c5e1f41e173c0444fa (patch)
tree78cfb2aa8709cfd18c76ac619d7567c84529b438
parentfc48d1dcf55d7195bf79cddb93dfd341a5fada7e (diff)
downloadgem5-bbeb8082a56b765181b769c5e1f41e173c0444fa.tar.xz
main: add .m5/options.py processing. This file is processed before
arguments are parsed so that they can change the default options for various config parameters.
-rw-r--r--src/python/m5/main.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/python/m5/main.py b/src/python/m5/main.py
index c4f26c472..4f28cf385 100644
--- a/src/python/m5/main.py
+++ b/src/python/m5/main.py
@@ -122,6 +122,13 @@ def main():
import info
import internal
+ # load the options.py config file to allow people to set their own
+ # default options
+ options_file = config.get('options.py')
+ if options_file:
+ scope = { 'options' : options }
+ execfile(options_file, scope)
+
arguments = options.parse_args()
done = False