Index: tools/gn/ninja_binary_target_writer.cc |
diff --git a/tools/gn/ninja_binary_target_writer.cc b/tools/gn/ninja_binary_target_writer.cc |
index ae46760059fff7fbb1e7dadb27351a3af1188ccd..b7dace7ab0afcee76a7e287501c2d3e6374fe0e9 100644 |
--- a/tools/gn/ninja_binary_target_writer.cc |
+++ b/tools/gn/ninja_binary_target_writer.cc |
@@ -420,12 +420,16 @@ void NinjaBinaryTargetWriter::WriteCompilerVars( |
WriteOneFlag(SUBSTITUTION_ASMFLAGS, false, Toolchain::TYPE_NONE, |
&ConfigValues::asmflags, opts); |
} |
+ // TODO(andybons): Remove SOURCE_S and SOURCE_ASM checks once asmflags is |
+ // used. |
if (used_types.Get(SOURCE_C) || used_types.Get(SOURCE_CPP) || |
- used_types.Get(SOURCE_M) || used_types.Get(SOURCE_MM)) { |
+ used_types.Get(SOURCE_M) || used_types.Get(SOURCE_MM) || |
+ used_types.Get(SOURCE_S) || used_types.Get(SOURCE_ASM)) { |
WriteOneFlag(SUBSTITUTION_CFLAGS, false, Toolchain::TYPE_NONE, |
&ConfigValues::cflags, opts); |
} |
- if (used_types.Get(SOURCE_C)) { |
+ if (used_types.Get(SOURCE_C) || used_types.Get(SOURCE_S) || |
+ used_types.Get(SOURCE_ASM)) { |
WriteOneFlag(SUBSTITUTION_CFLAGS_C, has_precompiled_headers, |
Toolchain::TYPE_CC, &ConfigValues::cflags_c, opts); |
} |