summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2020-05-27 15:54:19 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-28 17:35:43 +0000
commita7541c60e5904e7deafdedf5bb040cc8924ac7d3 (patch)
treeecd9d7840f92270aca36ed14e76401cd2d7bb267 /site_scons
parentfa375b0b13a392f64f44fc48df9b152f3fbcc88b (diff)
downloadmongo-a7541c60e5904e7deafdedf5bb040cc8924ac7d3.tar.gz
SERVER-48454 Ignore [UN]CHANGED_[SOURCES|TARGETS] during ninja generation
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/ninja_next.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/site_scons/site_tools/ninja_next.py b/site_scons/site_tools/ninja_next.py
index f999b746560..0ce56407439 100644
--- a/site_scons/site_tools/ninja_next.py
+++ b/site_scons/site_tools/ninja_next.py
@@ -1358,6 +1358,16 @@ def generate(env):
SCons.Node.FS.Dir.get_csig = ninja_csig(SCons.Node.FS.Dir.get_csig)
SCons.Node.Alias.Alias.get_csig = ninja_csig(SCons.Node.Alias.Alias.get_csig)
+ # Ignore CHANGED_SOURCES and CHANGED_TARGETS. We don't want those
+ # to have effect in a generation pass because the generator
+ # shouldn't generate differently depending on the current local
+ # state. Without this, when generating on Windows, if you already
+ # had a foo.obj, you would omit foo.cpp from the response file. Do the same for UNCHANGED.
+ SCons.Executor.Executor._get_changed_sources = SCons.Executor.Executor._get_sources
+ SCons.Executor.Executor._get_changed_targets = SCons.Executor.Executor._get_targets
+ SCons.Executor.Executor._get_unchanged_sources = SCons.Executor.Executor._get_sources
+ SCons.Executor.Executor._get_unchanged_targets = SCons.Executor.Executor._get_targets
+
# Replace false action messages with nothing.
env["PRINT_CMD_LINE_FUNC"] = ninja_noop