Index: tools/gn/ninja_target_writer.cc |
diff --git a/tools/gn/ninja_target_writer.cc b/tools/gn/ninja_target_writer.cc |
index cfc207cf8cc04364fca851c4b70148d1cf80c26c..76413076685207938ec73c2bd9d192ae0efa8f16 100644 |
--- a/tools/gn/ninja_target_writer.cc |
+++ b/tools/gn/ninja_target_writer.cc |
@@ -103,6 +103,12 @@ void NinjaTargetWriter::WriteSharedVars(const SubstitutionBits& bits) { |
written_anything = true; |
} |
+ // Target label name |
+ if (bits.used[SUBSTITUTION_LABEL_NAME]) { |
+ WriteEscapedSubstitution(SUBSTITUTION_LABEL_NAME); |
+ written_anything = true; |
+ } |
+ |
// Root gen dir. |
if (bits.used[SUBSTITUTION_ROOT_GEN_DIR]) { |
WriteEscapedSubstitution(SUBSTITUTION_ROOT_GEN_DIR); |