diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2020-02-06 19:36:18 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-13 18:01:07 +0000 |
commit | 6df40e01f7b6899affc4536e7e73a35802cabf98 (patch) | |
tree | c5fac4cf5fe9e2cd39559e643af6eb4ac963ca77 /site_scons | |
parent | f5c60d199a34ee1cc1ce96fd006098b7ab2dd81a (diff) | |
download | mongo-6df40e01f7b6899affc4536e7e73a35802cabf98.tar.gz |
SERVER-46134 SCons does not respect CCACHE settings
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/ccache.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/site_scons/site_tools/ccache.py b/site_scons/site_tools/ccache.py index cabb2d316b5..00fcf76f4b5 100644 --- a/site_scons/site_tools/ccache.py +++ b/site_scons/site_tools/ccache.py @@ -82,6 +82,11 @@ def generate(env): if not exists(env): return + # Propagate CCACHE related variables into the command environment + for var, host_value in os.environ.items(): + if var.startswith("CCACHE_"): + env["ENV"][var] = host_value + # Record our found CCACHE_VERSION. Other tools that need to know # about ccache (like iecc) should query this variable to determine # if ccache is active. Looking at the CCACHE variable in the @@ -89,12 +94,6 @@ def generate(env): # but it doesn't work or is out of date. env["CCACHE_VERSION"] = _ccache_version_found - # ccache does not support response files so force scons to always - # use the full command - # - # Note: This only works for Python versions >= 3.5 - env["MAXLINELENGTH"] = math.inf - # Add ccache to the relevant command lines. Wrap the reference to # ccache in the $( $) pattern so that turning ccache on or off # doesn't invalidate your build. |