diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/clang/config.mk | 8 | ||||
-rw-r--r-- | core/config.mk | 4 |
2 files changed, 11 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 := diff --git a/core/config.mk b/core/config.mk index d1371f3..9344958 100644 --- a/core/config.mk +++ b/core/config.mk @@ -135,6 +135,10 @@ COMMON_RELEASE_CFLAGS:= -DNDEBUG -UDEBUG COMMON_GLOBAL_CPPFLAGS:= $(COMMON_GLOBAL_CFLAGS) -Wsign-promo -std=gnu++11 COMMON_RELEASE_CPPFLAGS:= $(COMMON_RELEASE_CFLAGS) +# 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 + GLOBAL_CFLAGS_NO_OVERRIDE := \ -Werror=int-to-pointer-cast \ -Werror=pointer-to-int-cast \ |