diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2010-11-08 13:58:24 -0600 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2010-11-08 13:58:24 -0600 |
commit | 5fcf442f4f0d85c5f3fcf6bfd4ecbf37a1f3f4c9 (patch) | |
tree | 3edf36299ed24212a70e8ad36205eb8cdf22caa2 /SConstruct | |
parent | b4b6a2338aab3224baec7add32da31300f6e4082 (diff) | |
download | gem5-5fcf442f4f0d85c5f3fcf6bfd4ecbf37a1f3f4c9.tar.xz |
scons: add a parameter to configure SCons' build cache
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 850c122ca..b265c50af 100644 --- a/SConstruct +++ b/SConstruct @@ -312,6 +312,7 @@ global_sticky_vars.AddVariables( ('CXX', 'C++ compiler', environ.get('CXX', main['CXX'])), ('BATCH', 'Use batch pool for build and tests', False), ('BATCH_CMD', 'Batch pool submission command name', 'qdo'), + ('M5_BUILD_CACHE', 'Cache built objects in this directory', False), ('EXTRAS', 'Add Extra directories to the compilation', '', PathListAllExist, PathListMakeAbsolute), ) @@ -549,6 +550,12 @@ py_libs.append(py_version) main.Append(CPPPATH=py_includes) main.Append(LIBPATH=py_lib_path) +# Cache build files in the supplied directory. +if main['M5_BUILD_CACHE']: + print 'Using build cache located at', main['M5_BUILD_CACHE'] + CacheDir(main['M5_BUILD_CACHE']) + + # verify that this stuff works if not conf.CheckHeader('Python.h', '<>'): print "Error: can't find Python.h header in", py_includes |