Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 466b2b95000a68f3050fbd9f4fc5e657137ed1de..74accae9493c1f841c57dc37333a4cd425c13285 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -130,6 +130,14 @@ config("compiler") { |
} else { |
cflags += [ "-m64" ] |
} |
+ if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == |
+ "True") { |
+ cflags += [ |
+ # cmd.exe doesn't understand ANSI escape codes by default, |
+ # so only enable them if something emulating them is around. |
+ "-fansi-escape-codes", |
+ ] |
+ } |
} |
} else { |
# Common GCC compiler flags setup. |