main: add .m5/options.py processing. This file is processed before
authorNathan Binkert <nate@binkert.org>
Sun, 15 Jun 2008 04:16:00 +0000 (21:16 -0700)
committerNathan Binkert <nate@binkert.org>
Sun, 15 Jun 2008 04:16:00 +0000 (21:16 -0700)
arguments are parsed so that they can change the default options for
various config parameters.

src/python/m5/main.py

index c4f26c472194b4dcb6bdb73c30e694e4314f2a7d..4f28cf385b0e8f48b9834efb9368b372e988f817 100644 (file)
@@ -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