diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2011-08-02 00:10:08 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2011-08-02 00:10:08 -0500 |
commit | 1b49c56679b18b068e04cfe074bf984897fe656b (patch) | |
tree | 200a63d9313333626c7a2138892ce7aaf1f44f35 | |
parent | 206c2e9a0ee04e00100dde25da9b15cbfbaac0d6 (diff) | |
download | gem5-1b49c56679b18b068e04cfe074bf984897fe656b.tar.xz |
Scons: Drop RUBY as compile time option.
This patch drops RUBY as a compile time option. Instead the PROTOCOL option
is used to figure out whether or not to build Ruby. If the specified protocol
is 'None', then Ruby is not compiled.
-rwxr-xr-x | SConstruct | 6 | ||||
-rw-r--r-- | build_opts/ALPHA_SE_MESI_CMP_directory | 1 | ||||
-rw-r--r-- | build_opts/ALPHA_SE_MOESI_CMP_directory | 1 | ||||
-rw-r--r-- | build_opts/ALPHA_SE_MOESI_CMP_token | 1 | ||||
-rw-r--r-- | build_opts/ALPHA_SE_MOESI_hammer | 1 | ||||
-rw-r--r-- | build_opts/ALPHA_SE_Network_test | 1 | ||||
-rw-r--r-- | configs/example/se.py | 9 | ||||
-rw-r--r-- | src/mem/protocol/SConsopts | 13 | ||||
-rw-r--r-- | tests/SConscript | 10 |
9 files changed, 11 insertions, 32 deletions
diff --git a/SConstruct b/SConstruct index 8c09e5e4d..6074675c8 100755 --- a/SConstruct +++ b/SConstruct @@ -810,7 +810,6 @@ sticky_vars.AddVariables( BoolVariable('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv), BoolVariable('USE_CHECKER', 'Use checker for detailed CPU models', False), BoolVariable('CP_ANNOTATE', 'Enable critical path annotation capability', False), - BoolVariable('RUBY', 'Build with Ruby', False), ) # These variables get exported to #defines in config/*.hh (see src/SConscript). @@ -985,6 +984,11 @@ for variant_path in variant_paths: if env['USE_SSE2']: env.Append(CCFLAGS=['-msse2']) + if env['PROTOCOL'] != 'None': + env['RUBY'] = True + else: + env['RUBY'] = False + # The src/SConscript file sets up the build rules in 'env' according # to the configured variables. It returns a list of environments, # one for each variant build (debug, opt, etc.) diff --git a/build_opts/ALPHA_SE_MESI_CMP_directory b/build_opts/ALPHA_SE_MESI_CMP_directory index 3db3daa02..c55731b30 100644 --- a/build_opts/ALPHA_SE_MESI_CMP_directory +++ b/build_opts/ALPHA_SE_MESI_CMP_directory @@ -2,4 +2,3 @@ FULL_SYSTEM = 0 SS_COMPATIBLE_FP = 1 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU' PROTOCOL = 'MESI_CMP_directory' -RUBY = True diff --git a/build_opts/ALPHA_SE_MOESI_CMP_directory b/build_opts/ALPHA_SE_MOESI_CMP_directory index 5685952af..5edc7688b 100644 --- a/build_opts/ALPHA_SE_MOESI_CMP_directory +++ b/build_opts/ALPHA_SE_MOESI_CMP_directory @@ -2,4 +2,3 @@ FULL_SYSTEM = 0 SS_COMPATIBLE_FP = 1 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU' PROTOCOL = 'MOESI_CMP_directory' -RUBY = True diff --git a/build_opts/ALPHA_SE_MOESI_CMP_token b/build_opts/ALPHA_SE_MOESI_CMP_token index 372be578d..f69c2c48c 100644 --- a/build_opts/ALPHA_SE_MOESI_CMP_token +++ b/build_opts/ALPHA_SE_MOESI_CMP_token @@ -2,4 +2,3 @@ FULL_SYSTEM = 0 SS_COMPATIBLE_FP = 1 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU' PROTOCOL = 'MOESI_CMP_token' -RUBY = True diff --git a/build_opts/ALPHA_SE_MOESI_hammer b/build_opts/ALPHA_SE_MOESI_hammer index 23bbc07a8..f21ca5e5d 100644 --- a/build_opts/ALPHA_SE_MOESI_hammer +++ b/build_opts/ALPHA_SE_MOESI_hammer @@ -2,4 +2,3 @@ FULL_SYSTEM = 0 SS_COMPATIBLE_FP = 1 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU' PROTOCOL = 'MOESI_hammer' -RUBY = True diff --git a/build_opts/ALPHA_SE_Network_test b/build_opts/ALPHA_SE_Network_test index a092a94fd..77426d349 100644 --- a/build_opts/ALPHA_SE_Network_test +++ b/build_opts/ALPHA_SE_Network_test @@ -2,4 +2,3 @@ FULL_SYSTEM = 0 SS_COMPATIBLE_FP = 1 CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU' PROTOCOL = 'Network_test' -RUBY = True diff --git a/configs/example/se.py b/configs/example/se.py index 6ed3de4f6..a34a03b29 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -71,13 +71,12 @@ parser.add_option("-i", "--input", default="", help="Read stdin from a file.") parser.add_option("--output", default="", help="Redirect stdout to a file.") parser.add_option("--errout", default="", help="Redirect stderr to a file.") -if 'PROTOCOL' in buildEnv: - parser.add_option("--ruby", action="store_true") - execfile(os.path.join(config_root, "common", "Options.py")) -if '--ruby' in sys.argv: - Ruby.define_options(parser) +if buildEnv['PROTOCOL'] != 'None': + parser.add_option("--ruby", action="store_true") + if '--ruby' in sys.argv: + Ruby.define_options(parser) (options, args) = parser.parse_args() diff --git a/src/mem/protocol/SConsopts b/src/mem/protocol/SConsopts index dac52d742..6a6bd798e 100644 --- a/src/mem/protocol/SConsopts +++ b/src/mem/protocol/SConsopts @@ -34,24 +34,15 @@ Import('*') all_protocols = [ 'MESI_CMP_directory', - 'MESI_SCMP_bankdirectory', - 'MESI_SCMP_bankdirectory_m', 'MI_example', 'MOESI_CMP_directory', - 'MOESI_CMP_directory_m', 'MOESI_CMP_token', - 'MOESI_SMP_directory', - 'MOESI_SMP_token', - 'MOSI_SMP_bcast', - 'MOSI_SMP_bcast_1level', - 'MOSI_SMP_bcast_m', - 'MOSI_SMP_directory_1level', - 'MSI_MOSI_CMP_directory', 'MOESI_hammer', 'Network_test', + 'None' ] -opt = EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'MI_example', +opt = EnumVariable('PROTOCOL', 'Coherence protocol for Ruby', 'None', all_protocols) sticky_vars.AddVariables(opt) diff --git a/tests/SConscript b/tests/SConscript index 2316d9092..58a959669 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -289,16 +289,6 @@ else: 'inorder-timing', 'rubytest'] if env['RUBY']: - # With Ruby, A protocol must be specified in the environment - assert(env['PROTOCOL']) - - # - # Is there a way to determine what is Protocol EnumVariable - # default and eliminate the need to hard code the default protocol below? - # - # If the binary includes the default ruby protocol, run both ruby and - # non-ruby versions of the tests. Otherwise just run the ruby versions. - # if env['PROTOCOL'] == 'MI_example': configs += [c + "-ruby" for c in configs] else: |