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:50:45 +0000
commit90143b2e20059a7714577f2dfa501ac2658ac3c2 (patch)
treeb6c741b55b15f2157c2134f2f781aada60ffb4e2 /site_scons
parent44cfcb4f341f2676984702c9cc3b000dffa0ec24 (diff)
downloadmongo-90143b2e20059a7714577f2dfa501ac2658ac3c2.tar.gz
SERVER-48454 Ignore [UN]CHANGED_[SOURCES|TARGETS] during ninja generation
(cherry picked from commit a7541c60e5904e7deafdedf5bb040cc8924ac7d3)
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 38a065cf65b..7e777f5b686 100644
--- a/site_scons/site_tools/ninja_next.py
+++ b/site_scons/site_tools/ninja_next.py
@@ -1349,6 +1349,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