-def PathListMakeAbsolute(val):
- if not val:
- return val
- f = lambda p: os.path.abspath(os.path.expanduser(p))
- return ':'.join(map(f, val.split(':')))
-
-def PathListAllExist(key, val, env):
- if not val:
- return
- paths = val.split(':')
- for path in paths:
- if not isdir(path):
- raise SCons.Errors.UserError("Path does not exist: '%s'" % path)
-
-sticky_opts.AddOptions(
- EnumOption('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list),
- BoolOption('FULL_SYSTEM', 'Full-system support', False),
- # There's a bug in scons 0.96.1 that causes ListOptions with list
- # values (more than one value) not to be able to be restored from
- # a saved option file. If this causes trouble then upgrade to
- # scons 0.96.90 or later.
- ListOption('CPU_MODELS', 'CPU models', default_cpus, all_cpu_list),
- BoolOption('NO_FAST_ALLOC', 'Disable fast object allocator', False),
- BoolOption('EFENCE', 'Link with Electric Fence malloc debugger',
- False),
- BoolOption('SS_COMPATIBLE_FP',
- 'Make floating-point results compatible with SimpleScalar',
- False),
- BoolOption('USE_SSE2',
- 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
- False),
- BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql),
- BoolOption('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
- BoolOption('USE_CHECKER', 'Use checker for detailed CPU models', False),
- ('CC', 'C compiler', os.environ.get('CC', env['CC'])),
- ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])),
- BoolOption('BATCH', 'Use batch pool for build and tests', False),
- ('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
- ('PYTHONHOME',
- 'Override the default PYTHONHOME for this system (use with caution)',
- '%s:%s' % (sys.prefix, sys.exec_prefix)),
- ('EXTRAS', 'Add Extra directories to the compilation', '',
- PathListAllExist, PathListMakeAbsolute)
+sticky_vars.AddVariables(
+ EnumVariable('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list),
+ BoolVariable('FULL_SYSTEM', 'Full-system support', False),
+ ListVariable('CPU_MODELS', 'CPU models', default_cpus, all_cpu_list),
+ BoolVariable('NO_FAST_ALLOC', 'Disable fast object allocator', False),
+ BoolVariable('FAST_ALLOC_DEBUG', 'Enable fast object allocator debugging',
+ False),
+ BoolVariable('FAST_ALLOC_STATS', 'Enable fast object allocator statistics',
+ False),
+ BoolVariable('EFENCE', 'Link with Electric Fence malloc debugger',
+ False),
+ BoolVariable('SS_COMPATIBLE_FP',
+ 'Make floating-point results compatible with SimpleScalar',
+ False),
+ BoolVariable('USE_SSE2',
+ 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
+ False),
+ BoolVariable('USE_MYSQL', 'Use MySQL for stats output', have_mysql),
+ 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),