scons,ruby: do not generate unnecessary files
authorBrandon Potter <brandon.potter@amd.com>
Thu, 15 Feb 2018 22:31:10 +0000 (17:31 -0500)
committerBrandon Potter <Brandon.Potter@amd.com>
Fri, 17 Aug 2018 17:21:02 +0000 (17:21 +0000)
Do not generate garnet tester file or Ruby debug headers without a Ruby
protocol (i.e. PROTOCOL=None). It makes no sense to include these files
into the build when there will be no protocol to utilize them.

Change-Id: I8db4dd532f60008217a10c88a2e089f85df9d104
Reviewed-on: https://gem5-review.googlesource.com/8381
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/cpu/testers/garnet_synthetic_traffic/SConscript
src/mem/ruby/SConscript

index f1624b05e2ae2ce53297e49a27fc9ad918815fba..8fe4def36ae3c7231be0f8932cdb068acc8bf1e7 100644 (file)
@@ -30,6 +30,9 @@
 
 Import('*')
 
+if env['PROTOCOL'] == 'None':
+    Return()
+
 SimObject('GarnetSyntheticTraffic.py')
 
 Source('GarnetSyntheticTraffic.cc')
index 64e798fd51aebb3b215dacaa729639c4e8573311..be52c02d04ef027048aa3cdd3702ca3418ffabc5 100644 (file)
@@ -41,6 +41,9 @@ from gem5_scons import Transform
 
 Import('*')
 
+if env['PROTOCOL'] == 'None':
+    Return()
+
 DebugFlag('ProtocolTrace')
 DebugFlag('RubyCache')
 DebugFlag('RubyCacheTrace')
@@ -62,9 +65,6 @@ CompoundFlag('Ruby', [ 'RubyQueue', 'RubyNetwork', 'RubyTester',
     'RubyDma', 'RubyPort', 'RubySequencer', 'RubyCacheTrace',
     'RubyPrefetcher'])
 
-if env['PROTOCOL'] == 'None':
-    Return()
-
 def do_embed_text(target, source, env):
     """convert a text file into a file that can be embedded in C
     using an #include statement, that defines a \"const char *\" pointing