diff options
author | Colin Cross <ccross@android.com> | 2015-09-24 22:14:25 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-07 05:45:17 -0800 |
commit | b425f41d95796e9e013de536b200aa6324725e6d (patch) | |
tree | 9f61d974d3885f942748e5fa7f513b61aee8d0d3 /core/clang | |
parent | 8113a248b00bfa031f6f7f74f0df25723ef1b67b (diff) | |
download | build-b425f41d95796e9e013de536b200aa6324725e6d.zip build-b425f41d95796e9e013de536b200aa6324725e6d.tar.gz build-b425f41d95796e9e013de536b200aa6324725e6d.tar.bz2 |
Enable color output from gcc and clang
Force gcc and clang to always output color diagnostics. Ninja will
strip the ANSI color codes if it is not running in a terminal.
Bug: 24273983
Change-Id: Ic9252549bfacf3bbb3f4b9d20f63010fc24ac21d
Diffstat (limited to 'core/clang')
-rw-r--r-- | core/clang/config.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/clang/config.mk b/core/clang/config.mk index e1bfb01..b887c83 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -52,6 +52,11 @@ CLANG_CONFIG_EXTRA_CFLAGS += \ CLANG_CONFIG_EXTRA_CPPFLAGS += \ -Wno-inconsistent-missing-override +# Force clang to always output color diagnostics. Ninja will strip the ANSI +# color codes if it is not running in a terminal. +CLANG_CONFIG_EXTRA_CFLAGS += \ + -fcolor-diagnostics + CLANG_CONFIG_UNKNOWN_CFLAGS := \ -finline-functions \ -finline-limit=64 \ @@ -77,7 +82,8 @@ CLANG_CONFIG_UNKNOWN_CFLAGS := \ -Wno-unused-but-set-variable \ -Wno-unused-local-typedefs \ -Wunused-but-set-parameter \ - -Wunused-but-set-variable + -Wunused-but-set-variable \ + -fdiagnostics-color # Clang flags for all host rules CLANG_CONFIG_HOST_EXTRA_ASFLAGS := |