Fix gcc color diagnostics

gcc color diagnostics stopped working when the flag was moved to
TARGET_GLOBAL_CFLAGS, as that gets overwritten by combo/select.mk.  Put
it back in COMMON_GLOBAL_CFLAGS, and then let the windows build filter
it out, similar to the way clang deals with unknown flags.

Change-Id: I2db221edb893d81f199494e7515d1b9282c12fae
This commit is contained in:
Colin Cross 2015-10-02 15:17:47 -07:00
parent b959980487
commit 12adaf5cb9
2 changed files with 5 additions and 5 deletions

View File

@ -53,3 +53,6 @@ $(combo_var_prefix)SHLIB_SUFFIX := .dll
$(combo_var_prefix)EXECUTABLE_SUFFIX := .exe
$(combo_var_prefix)IS_64_BIT :=
# The mingw gcc is 4.8, 4.9 is required for color diagnostics
$(combo_var_prefix)UNKNOWN_CFLAGS := -fdiagnostics-color

View File

@ -122,10 +122,7 @@ 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.
# Use host and target GLOBAL_CFLAGS so it doesn't apply to HOST_CROSS, the windows
# toolchain is still 4.8 and doesn't support color.
HOST_GLOBAL_CFLAGS += -fdiagnostics-color
TARGET_GLOBAL_CFLAGS += -fdiagnostics-color
COMMON_GLOBAL_CFLAGS += -fdiagnostics-color
COMMON_GLOBAL_CPPFLAGS:= -Wsign-promo
COMMON_RELEASE_CPPFLAGS:=
@ -625,7 +622,7 @@ $(HOST_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CPPFLAGS += $($(HOST_2ND_ARCH_VAR_PREFIX)
endif
ifdef HOST_CROSS_OS
HOST_CROSS_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS)
HOST_CROSS_GLOBAL_CFLAGS += $(filter-out $(HOST_CROSS_UNKNOWN_CFLAGS),$(COMMON_GLOBAL_CFLAGS))
HOST_CROSS_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS)
HOST_CROSS_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS)
HOST_CROSS_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS)