| Index: tools/gn/substitution_writer.cc
|
| diff --git a/tools/gn/substitution_writer.cc b/tools/gn/substitution_writer.cc
|
| index 0351eb17f97d0d981ff01c94943204fb4b843249..2af2e186e4be40504698f744a0b252ac35111f26 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,
|
|
|