commit | 32c32ad2b4bac30e2fdf33d403405946fe1a8a5c | [log] [tgz] |
---|---|---|
author | Hector Dearman <hjd@google.com> | Wed Oct 18 11:53:32 2017 +0100 |
committer | Hector Dearman <hjd@google.com> | Wed Oct 18 10:54:45 2017 +0000 |
tree | 0d3e3f040169b864239ef901da08b2743bf397c3 | |
parent | d0668cbdb40cb0a9d8c872b2fda1447a9dbf81e4 [diff] |
Make ninja compiler output colorized (under clang) By default clang turns off color output under ninja since ninja buffers the output of commands to files to prevent intervening. This forces color output on. See https://github.com/ninja-build/ninja/wiki/FAQ and the equivalent line in Chromium https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?type=cs&q=fcolor-diagnostics&sq=package:chromium&l=422 Change-Id: Idb3c11a536e415364c5e7d48f57abf645c040423
diff --git a/build/BUILD.gn b/build/BUILD.gn index 4078384..1aa1772 100644 --- a/build/BUILD.gn +++ b/build/BUILD.gn
@@ -68,6 +68,11 @@ "-Werror", ] + # Color compiler output, see https://github.com/ninja-build/ninja/wiki/FAQ + if (is_clang) { + cflags += [ "-fcolor-diagnostics" ] + } + if (current_cpu == "arm") { cflags += [ "-march=armv7-a",