summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct7
-rw-r--r--site_scons/site_tools/icecream.py3
2 files changed, 10 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index baf5d3c1a9b..df966652506 100644
--- a/SConstruct
+++ b/SConstruct
@@ -14,6 +14,8 @@ import sys
import textwrap
import uuid
+from pkg_resources import parse_version
+
import SCons
# This must be first, even before EnsureSConsVersion, if
@@ -3839,6 +3841,11 @@ elif env.ToolchainIs("gcc"):
env.Tool('icecream')
if get_option('ninja') != 'disabled':
+
+ if 'ICECREAM_VERSION' in env and not env.get('CCACHE', None):
+ if env['ICECREAM_VERSION'] < parse_version("1.2"):
+ env.FatalError("Use of ccache is mandatory with --ninja and icecream older than 1.2. You are running {}.".format(env['ICECREAM_VERSION']))
+
if get_option('ninja') == 'stable':
ninja_builder = Tool("ninja")
ninja_builder.generate(env)
diff --git a/site_scons/site_tools/icecream.py b/site_scons/site_tools/icecream.py
index 5ed9faa9456..e5bf112767d 100644
--- a/site_scons/site_tools/icecream.py
+++ b/site_scons/site_tools/icecream.py
@@ -282,4 +282,7 @@ def exists(env):
if icecc_version >= _icecream_version_min:
validated = True
+ if validated:
+ env['ICECREAM_VERSION'] = icecc_version
+
return validated