Skip to content

Commit a7541c6

Browse files
acmorrowEvergreen Agent
authored andcommitted
SERVER-48454 Ignore [UN]CHANGED_[SOURCES|TARGETS] during ninja generation
1 parent fa375b0 commit a7541c6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

site_scons/site_tools/ninja_next.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,16 @@ def robust_rule_mapping(var, rule, tool):
13581358
SCons.Node.FS.Dir.get_csig = ninja_csig(SCons.Node.FS.Dir.get_csig)
13591359
SCons.Node.Alias.Alias.get_csig = ninja_csig(SCons.Node.Alias.Alias.get_csig)
13601360

1361+
# Ignore CHANGED_SOURCES and CHANGED_TARGETS. We don't want those
1362+
# to have effect in a generation pass because the generator
1363+
# shouldn't generate differently depending on the current local
1364+
# state. Without this, when generating on Windows, if you already
1365+
# had a foo.obj, you would omit foo.cpp from the response file. Do the same for UNCHANGED.
1366+
SCons.Executor.Executor._get_changed_sources = SCons.Executor.Executor._get_sources
1367+
SCons.Executor.Executor._get_changed_targets = SCons.Executor.Executor._get_targets
1368+
SCons.Executor.Executor._get_unchanged_sources = SCons.Executor.Executor._get_sources
1369+
SCons.Executor.Executor._get_unchanged_targets = SCons.Executor.Executor._get_targets
1370+
13611371
# Replace false action messages with nothing.
13621372
env["PRINT_CMD_LINE_FUNC"] = ninja_noop
13631373

0 commit comments

Comments
 (0)