summaryrefslogtreecommitdiff
path: root/build/SConstruct
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2005-09-22 15:27:42 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2005-09-22 15:27:42 -0400
commitb15a7aaf5e2099a3d13061c63246bed8378d2e2f (patch)
treebb1fd61d7fd54d80ec9533ff8ab64b0d9dc7019b /build/SConstruct
parente1c61e5b2f041b5b0a48ae2ba146d537757d5e01 (diff)
downloadgem5-b15a7aaf5e2099a3d13061c63246bed8378d2e2f.tar.xz
Support for compiling and testing on pool via 'qdo' script.
For this to work qdo must be on your path. I've copied it into /usr/local/bin on zizzer. build/SConstruct: Add BATCH and BATCH_CMD options to support compiling/testing on pool via qdo. --HG-- extra : convert_revision : b7fc46465e897f7f15ed4a67f6735886917a6c4b
Diffstat (limited to 'build/SConstruct')
-rw-r--r--build/SConstruct10
1 files changed, 9 insertions, 1 deletions
diff --git a/build/SConstruct b/build/SConstruct
index 1d4e4db57..7f237ca77 100644
--- a/build/SConstruct
+++ b/build/SConstruct
@@ -239,7 +239,9 @@ sticky_opts.AddOptions(
BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql),
BoolOption('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
('CC', 'C compiler', os.environ.get('CC', env['CC'])),
- ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX']))
+ ('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')
)
# Non-sticky options only apply to the current build.
@@ -354,6 +356,12 @@ for build_dir in build_dirs:
# Save sticky option settings back to file
sticky_opts.Save(options_file, env)
+ # Do this after we save setting back, or else we'll tack on an
+ # extra 'qdo' every time we run scons.
+ if env['BATCH']:
+ env['CC'] = env['BATCH_CMD'] + ' ' + env['CC']
+ env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX']
+
# The m5/SConscript file sets up the build rules in 'env' according
# to the configured options. It returns a list of environments,
# one for each variant build (debug, opt, etc.)