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
diff --git a/core/config.mk b/core/config.mk
index 12308fd..697f91a 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -120,6 +120,10 @@
 COMMON_GLOBAL_CFLAGS:= -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith
 COMMON_RELEASE_CFLAGS:= -DNDEBUG -UDEBUG
 
+# Force gcc to always output color diagnostics.  Ninja will strip the ANSI
+# color codes if it is not running in a terminal.
+COMMON_GLOBAL_CFLAGS += -fdiagnostics-color
+
 COMMON_GLOBAL_CPPFLAGS:= -Wsign-promo
 COMMON_RELEASE_CPPFLAGS:=