-sticky_opts = Options(args=ARGUMENTS)
-sticky_opts.AddOptions(
- EnumOption('TARGET_ISA', 'Target ISA', 'alpha', env['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', 'AtomicSimpleCPU,TimingSimpleCPU,O3CPU',
- env['ALL_CPU_LIST']),
- BoolOption('ALPHA_TLASER',
- 'Model Alpha TurboLaser platform (vs. Tsunami)', False),
- 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))
+sticky_vars = Variables(args=ARGUMENTS)
+Export('sticky_vars')
+
+# Sticky variables that should be exported
+export_vars = []
+Export('export_vars')
+
+# Non-sticky variables only apply to the current build.
+nonsticky_vars = Variables(args=ARGUMENTS)
+Export('nonsticky_vars')
+
+# Walk the tree and execute all SConsopts scripts that wil add to the
+# above variables
+for bdir in [ base_dir ] + extras_dir_list:
+ for root, dirs, files in os.walk(bdir):
+ if 'SConsopts' in files:
+ print "Reading", joinpath(root, 'SConsopts')
+ SConscript(joinpath(root, 'SConsopts'))
+
+all_isa_list.sort()
+all_cpu_list.sort()
+default_cpus.sort()
+
+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),