summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <andrew.morrow@10gen.com>2019-12-26 20:49:40 +0000
committerevergreen <evergreen@mongodb.com>2019-12-26 20:49:40 +0000
commit01fc07d7e0ab23e88fc52fb9cb8bc46d890504d6 (patch)
tree867f2584e8ddccbf2c52060f7da7a22d4889d132 /SConstruct
parente53a88a3fa210ea3964586ecdf9ffecff39af2d7 (diff)
downloadmongo-01fc07d7e0ab23e88fc52fb9cb8bc46d890504d6.tar.gz
SERVER-44768 Make ccache work right with icecream and Ninja
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct24
1 files changed, 7 insertions, 17 deletions
diff --git a/SConstruct b/SConstruct
index 5c7095c8565..6451263d080 100644
--- a/SConstruct
+++ b/SConstruct
@@ -110,15 +110,6 @@ add_option('ninja',
help='Enable the build.ninja generator tool',
)
-add_option('ccache',
- choices=['true', 'false'],
- default='false',
- nargs='?',
- const='true',
- type='choice',
- help='Enable ccache support',
-)
-
add_option('prefix',
help='installation prefix (conficts with DESTDIR, PREFIX, and --install-mode=hygienic)',
)
@@ -696,18 +687,18 @@ env_vars.Add('ARFLAGS',
converter=variable_shlex_converter)
env_vars.Add('CCACHE',
- help='Path to ccache used for the --ccache option. Defaults to first ccache in PATH.')
+ help='Tell SCons where the ccache binary is')
env_vars.Add(
'CACHE_SIZE',
- help='Maximum size of the cache (in gigabytes)',
+ help='Maximum size of the SCons cache (in gigabytes)',
default=32,
converter=lambda x:int(x)
)
env_vars.Add(
'CACHE_PRUNE_TARGET',
- help='Maximum percent in-use in cache after pruning',
+ help='Maximum percent in-use in SCons cache after pruning',
default=66,
converter=lambda x:int(x)
)
@@ -3740,7 +3731,10 @@ def doConfigure(myenv):
env = doConfigure( env )
env["NINJA_SYNTAX"] = "#site_scons/third_party/ninja_syntax.py"
-# Now that we are done with configure checks, enable icecream, if available.
+# Now that we are done with configure checks, enable ccache and
+# icecream, if available. Per the rules declared in the icecream tool,
+# load the ccache tool first.
+env.Tool('ccache')
env.Tool('icecream')
if get_option('ninja') == 'true':
@@ -3818,10 +3812,6 @@ if get_option('ninja') == 'true':
env.NinjaRegisterFunctionHandler("write_uuid_to_file", fakelib_in_ninja)
- # Load ccache after icecream since order matters when we're both changing CCCOM
- if get_option('ccache') == 'true':
- env.Tool('ccache')
-
# TODO: Later, this should live somewhere more graceful.
if get_option('install-mode') == 'hygienic':