diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-12-08 15:18:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-12-08 16:07:31 +0100 |
commit | 9ab2703d5c212746c961dcb238a4c3025d3a2587 (patch) | |
tree | 3bbc76219456669f84930621a132a6b0f9464e8c /solenv | |
parent | b2c6d2d961a6113d0f111fab45ae12a40d389a23 (diff) |
Improve -fdiagnostics-color handling
...following up on 13b52f50e52d226c935dcb94fac641c59a77f13f "gbuild: color gcc
output if possible". Unconditional -fdiagnostics-color=auto overrode the
-fdiagnostics-color=always I specify in CC/CXX to mitigate using the GNU Make -O
option. Forcing -fdiagnostics-color=always iff gb_COLOR is set should give the
desired results in all cases (colored output to a terminal when calling make
without -O but using a GCC that defaults to -fdiagnostics-color=never, as well
as colored output to a terminal when calling make with -O).
Change-Id: I629bad4bceb15af3ed43f42038825bd1481b33dd
Reviewed-on: https://gerrit.libreoffice.org/84710
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 12e08ecdb95a..13c770baa79f 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -67,7 +67,7 @@ gb_CFLAGS_COMMON := \ -fno-common \ -pipe \ -fstack-protector-strong \ - -fdiagnostics-color=auto \ + $(if $(gb_COLOR),-fdiagnostics-color=always) \ gb_CXXFLAGS_COMMON := \ -Wall \ @@ -83,7 +83,7 @@ gb_CXXFLAGS_COMMON := \ -fno-common \ -pipe \ -fstack-protector-strong \ - -fdiagnostics-color=auto \ + $(if $(gb_COLOR),-fdiagnostics-color=always) \ gb_CXXFLAGS_DISABLE_WARNINGS = -w |