summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2022-03-17 10:37:08 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-23 16:45:06 +0000
commitfc2b624564c1ec4f7d27c98e5a0074920e7ee5a1 (patch)
tree03ad2d29c8075b557677a7367aa78aa72beed584 /SConstruct
parent1881a6bf29b756110d9e13e82e0999345854bf9c (diff)
downloadmongo-fc2b624564c1ec4f7d27c98e5a0074920e7ee5a1.tar.gz
SERVER-56003 use separate run icecc scripts for multiple ninja file builds.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct11
1 files changed, 11 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 67a057d577a..d6d3820aeb7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -4545,6 +4545,17 @@ if 'CCACHE' in env and env['CCACHE']:
if 'ICECC' in env and env['ICECC']:
env['ICECREAM_VERBOSE'] = env.Verbose()
env['ICECREAM_TARGET_DIR'] = '$BUILD_ROOT/scons/icecream'
+
+ # Posssibly multiple ninja files are in play, and there are cases where ninja will
+ # use the wrong icecc run script, so we must create a unique script per ninja variant
+ # for ninja to track separately. We will use the variant dir which contains the each
+ # separate ninja builds meta files. This has to be under an additional flag then just
+ # ninja disabled, because the run icecc script is generated under a context where ninja
+ # is always disabled via the scons callback mechanism. The __NINJA_NO flag is intended
+ # to differentiate this particular context.
+ if env.get('__NINJA_NO') or get_option('ninja') != 'disabled':
+ env['ICECREAM_RUN_SCRIPT_SUBPATH'] = '$VARIANT_DIR'
+
icecream = Tool('icecream')
if not icecream.exists(env):
env.FatalError(f"Failed to load icecream tool with ICECC={env['ICECC']}")