0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

SERVER-46021 Improve Ninja generator escaping for origin processing

This commit is contained in:
Andrew Morrow 2020-02-06 17:24:44 -05:00 committed by Evergreen Agent
parent 3b5e1c0e21
commit 01074b4518

View File

@ -843,6 +843,11 @@ def gen_get_response_file_command(env, rule, tool, tool_is_dynamic=False):
raise Exception("Could not find tool {} in {} generated from {}".format(tool, cmd_list, get_comstr(env, action, targets, sources)))
cmd, rsp_content = cmd_list[:tool_idx], cmd_list[tool_idx:]
# Some commands may have a need to pass a literal $ to a tool
# like ld (think $ORIGIN). We need to protect that $ from
# Ninja by using $$.
rsp_content = " ".join(rsp_content).replace('$', '$$')
variables = {"rspc": rsp_content}
variables[rule] = cmd
if use_command_env: