Skip to content

Commit

Permalink
cflags: add -fdiagnostics-color if supported
Browse files Browse the repository at this point in the history
  • Loading branch information
haukepetersen committed Jul 10, 2017
1 parent 1376848 commit 2811adc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions makefiles/cflags.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ 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
endif

# Fast-out on old style function definitions.
# They cause unreadable error compiler errors on missing semicolons.
# Worse yet they hide errors by accepting wildcard argument types.
Expand Down

0 comments on commit 2811adc

Please sign in to comment.