summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2020-09-08 13:08:34 -0700
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-09 02:44:01 +0000
commit58fd67fc2232a4ca591ff66443fd22213d4b5cac (patch)
tree7595fec1ea13954fba24d24658e5403a0f22d74d /SConstruct
parent3626a65b1d1f8ff2d230704146a09595f78bfe51 (diff)
downloadmongo-58fd67fc2232a4ca591ff66443fd22213d4b5cac.tar.gz
SERVER-50376 Ninja should rebuild on compiler and tool changes
Allow Ninja to rebuild build.ninja any time a SCons tool or the compiler is changed between iterative rebuilds. This change allows us to ensure that we don't have any stale object files lying around that may have been produced by an incompatible toolchain.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct10
1 files changed, 8 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index d0c9bb90889..cf7bd716727 100644
--- a/SConstruct
+++ b/SConstruct
@@ -4100,9 +4100,15 @@ if get_option('ninja') != 'disabled':
)
def get_idlc_command(env, node, action, targets, sources, executor=None):
- _, variables = env.NinjaGetShellCommand(node, action, targets, sources, executor=executor)
+ if get_option('build-tools') == 'next' or get_option('ninja') == 'next':
+ _, variables, _ = env.NinjaGetGenericShellCommand(node, action, targets, sources, executor=executor)
+ else:
+ _, variables = env.NinjaGetShellCommand(node, action, targets, sources, executor=executor)
variables["msvc_deps_prefix"] = "import file:"
- return "IDLC", variables
+ if get_option('build-tools') == 'next' or get_option('ninja') == 'next':
+ return "IDLC", variables, env.subst(env['IDLC']).split()
+ else:
+ return "IDLC", variables
env.NinjaRuleMapping("$IDLCCOM", get_idlc_command)
env.NinjaRuleMapping(env["IDLCCOM"], get_idlc_command)