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.
This commit is contained in:
parent
206c2e9a0e
commit
1b49c56679
9 changed files with 11 additions and 32 deletions
|
@ -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.)
|
||||
|
|
|
@ -2,4 +2,3 @@ FULL_SYSTEM = 0
|
|||
SS_COMPATIBLE_FP = 1
|
||||
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
|
||||
PROTOCOL = 'MESI_CMP_directory'
|
||||
RUBY = True
|
||||
|
|
|
@ -2,4 +2,3 @@ FULL_SYSTEM = 0
|
|||
SS_COMPATIBLE_FP = 1
|
||||
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
|
||||
PROTOCOL = 'MOESI_CMP_directory'
|
||||
RUBY = True
|
||||
|
|
|
@ -2,4 +2,3 @@ FULL_SYSTEM = 0
|
|||
SS_COMPATIBLE_FP = 1
|
||||
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
|
||||
PROTOCOL = 'MOESI_CMP_token'
|
||||
RUBY = True
|
||||
|
|
|
@ -2,4 +2,3 @@ FULL_SYSTEM = 0
|
|||
SS_COMPATIBLE_FP = 1
|
||||
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
|
||||
PROTOCOL = 'MOESI_hammer'
|
||||
RUBY = True
|
||||
|
|
|
@ -2,4 +2,3 @@ FULL_SYSTEM = 0
|
|||
SS_COMPATIBLE_FP = 1
|
||||
CPU_MODELS = 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU,InOrderCPU'
|
||||
PROTOCOL = 'Network_test'
|
||||
RUBY = True
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue