Index: tools/gn/substitution_writer.cc |
diff --git a/tools/gn/substitution_writer.cc b/tools/gn/substitution_writer.cc |
index a642e478c98e373a6907d94ee2c73aa183108973..126e81b54e6263f92382301c2937b421a8a51312 100644 |
--- a/tools/gn/substitution_writer.cc |
+++ b/tools/gn/substitution_writer.cc |
@@ -310,8 +310,10 @@ void SubstitutionWriter::WriteNinjaVariablesForSource( |
std::ostream& out) { |
for (const auto& type : types) { |
// Don't write SOURCE since that just maps to Ninja's $in variable, which |
- // is implicit in the rule. |
- if (type != SUBSTITUTION_SOURCE) { |
+ // is implicit in the rule. RESPONSE_FILE_NAME is written separately |
+ // only when writing target rules since it can never be used in any |
+ // other context (like process_file_template). |
+ if (type != SUBSTITUTION_SOURCE && type != SUBSTITUTION_RSP_FILE_NAME) { |
out << " " << kSubstitutionNinjaNames[type] << " = "; |
EscapeStringToStream( |
out, |