From 7390e05561a5c49306ebbf2eb2dcb1848546f201 Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Tue, 13 Mar 2018 09:29:41 +0000 Subject: COMPMID-955 Enable support for ccache Change-Id: I7ad27d51cd48a79a041d748ffc5704ac87b2e69f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124268 Tested-by: Jenkins Reviewed-by: Michalis Spyrou --- SConstruct | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'SConstruct') 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" -- cgit v1.2.1