Fix the CheckerCPU being included via python.
authorKevin Lim <ktlim@umich.edu>
Fri, 14 Jul 2006 21:51:29 +0000 (17:51 -0400)
committerKevin Lim <ktlim@umich.edu>
Fri, 14 Jul 2006 21:51:29 +0000 (17:51 -0400)
src/arch/SConscript:
    Fixes for including the CheckerCPU if it's specified via command line.  Previously the env variable was actually being modified.
src/cpu/SConscript:
    Copy the CPU_MODELS from the env, don't create a proxy to it.

--HG--
extra : convert_revision : 7d069bd93a6834ccaa1c378b2bc76dce76745c19

src/arch/SConscript
src/cpu/SConscript

index bc517341a4e655fc3137fb69b4c0e7e162d3493e..0a596288976a3ec375ae0826b85b03f7dfa07759 100644 (file)
@@ -140,8 +140,15 @@ def isa_desc_emitter(target, source, env):
 
 # Pieces are in place, so create the builder.
 python = sys.executable  # use same Python binary used to run scons
-isa_desc_builder = Builder(action=python + ' $SOURCES $TARGET.dir $CPU_MODELS',
-                           emitter = isa_desc_emitter)
+
+# Also include the CheckerCPU as one of the models if it is being
+# enabled via command line.
+if env['USE_CHECKER']:
+    isa_desc_builder = Builder(action=python + ' $SOURCES $TARGET.dir $CPU_MODELS CheckerCPU',
+                               emitter = isa_desc_emitter)
+else:
+    isa_desc_builder = Builder(action=python + ' $SOURCES $TARGET.dir $CPU_MODELS',
+                               emitter = isa_desc_emitter)
 
 env.Append(BUILDERS = { 'ISADesc' : isa_desc_builder })
 
index bc4ec7923d3eb6ef7b37901e1d798124c3b7fb60..442c190cef901cfb2a2cd1398728658bad4d9abe 100644 (file)
@@ -71,7 +71,8 @@ virtual Fault completeAcc(uint8_t *data, %s *xc, Trace::InstRecord *traceData) c
 # Generate a temporary CPU list, including the CheckerCPU if
 # it's enabled.  This isn't used for anything else other than StaticInst
 # headers.
-temp_cpu_list = env['CPU_MODELS']
+temp_cpu_list = env['CPU_MODELS'][:]
+
 if env['USE_CHECKER']:
     temp_cpu_list.append('CheckerCPU')