aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-03-13 09:29:41 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:16 +0000
commit7390e05561a5c49306ebbf2eb2dcb1848546f201 (patch)
tree12a01673ce2c3e5813ba593821971c8b4887fa27 /SConstruct
parent6727f12b7d5e29a98e42e846ca012a56e930fd33 (diff)
downloadComputeLibrary-7390e05561a5c49306ebbf2eb2dcb1848546f201.tar.gz
COMPMID-955 Enable support for ccache
Change-Id: I7ad27d51cd48a79a041d748ffc5704ac87b2e69f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124268 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct7
1 files changed, 4 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index e778e28a8a..59457c1eb9 100644
--- a/SConstruct
+++ b/SConstruct
@@ -56,7 +56,8 @@ vars.AddVariables(
PathVariable("build_dir", "Specify sub-folder for the build", ".", PathVariable.PathAccept),
#FIXME Remove before release (And remove all references to INTERNAL_ONLY)
BoolVariable("internal_only", "Enable ARM internal only tests", True),
- ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", "")
+ ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""),
+ ("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", "")
)
env = Environment(platform="posix", variables=vars, ENV = os.environ)
@@ -163,8 +164,8 @@ elif env['arch'] == 'x86_64':
if env['build'] == 'native':
prefix = ""
-env['CC'] = prefix + c_compiler
-env['CXX'] = prefix + cpp_compiler
+env['CC'] = env['compiler_cache']+" "+prefix + c_compiler
+env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler
env['LD'] = prefix + "ld"
env['AS'] = prefix + "as"
env['AR'] = prefix + "ar"