summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2020-02-14 10:42:28 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-14 15:57:50 +0000
commit1c69f63fe4597062055041a4f1b4e54d11dea34e (patch)
tree82d09b3a3574fb9376f5f9484cac8c4f1effee75 /site_scons
parent304143ac82ee910df84c58a62f3f18137290ca82 (diff)
downloadmongo-1c69f63fe4597062055041a4f1b4e54d11dea34e.tar.gz
SERVER-46136 Ninja should not use environment variables for response file rules on Windows
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/ninja.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/site_scons/site_tools/ninja.py b/site_scons/site_tools/ninja.py
index ae900edaa23..a865cc6dee3 100644
--- a/site_scons/site_tools/ninja.py
+++ b/site_scons/site_tools/ninja.py
@@ -814,16 +814,14 @@ def get_command_env(env):
def gen_get_response_file_command(env, rule, tool, tool_is_dynamic=False):
"""Generate a response file command provider for rule name."""
- # If win32 and working on a compile rule then we don't want to
- # calculate an environment for this command. It's a compile
- # command and compiledb doesn't support shell syntax on
- # Windows. We need the shell syntax to use environment variables
- # on Windows so we just skip this platform / rule combination to
- # keep the compiledb working.
+ # If win32 using the environment with a response file command will cause
+ # ninja to fail to create the response file. Additionally since these rules
+ # generally are not piping through cmd.exe /c any environment variables will
+ # make CreateProcess fail to start.
#
# On POSIX we can still set environment variables even for compile
# commands so we do so.
- use_command_env = not (env["PLATFORM"] == "win32" and rule in ["CC", "CXX"])
+ use_command_env = not env["PLATFORM"] == "win32"
if "$" in tool:
tool_is_dynamic = True