Skip to content

Commit

Permalink
Merge pull request #7451 from haukepetersen/opt_make_colorondemand
Browse files Browse the repository at this point in the history
make: allow for disabling colored compiler output
  • Loading branch information
miri64 authored Aug 7, 2017
2 parents e2099eb + 09ab7cb commit 2296d63
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions makefiles/cflags.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ ifeq ($(shell $(CC) -fno-delete-null-pointer-checks -E - 2>/dev/null >/dev/null
endif
endif

# Use colored gcc output if the compiler supports this
ifeq ($(shell $(CC) -fdiagnostics-color -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
CFLAGS += -fdiagnostics-color
# Use colored compiler output if the compiler supports this and if this is not
# disabled by the user
CC_NOCOLOR ?= 0
ifeq ($(CC_NOCOLOR),0)
ifeq ($(shell $(CC) -fdiagnostics-color -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
CFLAGS += -fdiagnostics-color
endif
endif

# Fast-out on old style function definitions.
Expand Down

0 comments on commit 2296d63

Please sign in to comment.